use of org.springframework.context.support.ClassPathXmlApplicationContext in project camel by apache.
the class CamelJaxbSpringTest method createCamelContext.
protected CamelContext createCamelContext() throws Exception {
setUseRouteBuilder(false);
final AbstractXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/jaxb/CamelJaxbTest.xml");
setCamelContextService(new Service() {
public void start() throws Exception {
applicationContext.start();
}
public void stop() throws Exception {
applicationContext.stop();
}
});
return SpringCamelContext.springCamelContext(applicationContext);
}
use of org.springframework.context.support.ClassPathXmlApplicationContext in project camel by apache.
the class CxfEndpointTest method testSpringCxfEndpoint.
@Test
public void testSpringCxfEndpoint() throws Exception {
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[] { "org/apache/camel/component/cxf/CxfEndpointBeans.xml" });
CxfComponent cxfComponent = new CxfComponent(new SpringCamelContext(ctx));
CxfSpringEndpoint endpoint = (CxfSpringEndpoint) cxfComponent.createEndpoint("cxf://bean:serviceEndpoint");
assertEquals("Got the wrong endpoint address", endpoint.getAddress(), "http://localhost:" + port2 + "/CxfEndpointTest/helloworld");
assertEquals("Got the wrong endpont service class", endpoint.getServiceClass().getCanonicalName(), "org.apache.camel.component.cxf.HelloService");
}
use of org.springframework.context.support.ClassPathXmlApplicationContext in project camel by apache.
the class CxfPayloadProducerNamespaceOnEnvelopeTest method setUp.
@Before
public void setUp() throws Exception {
applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GetTokenBeans.xml");
super.setUp();
assertNotNull("Should have created a valid spring context", applicationContext);
}
use of org.springframework.context.support.ClassPathXmlApplicationContext in project camel by apache.
the class CxfRsProducerClientFactoryCacheTest method setUp.
@Before
public void setUp() throws Exception {
applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/jaxrs/CxfRsProducerClientFactoryCacheTest1.xml");
context1 = SpringCamelContext.springCamelContext(applicationContext, false);
context1.start();
template1 = context1.createProducerTemplate();
template1.start();
}
use of org.springframework.context.support.ClassPathXmlApplicationContext in project redisson by redisson.
the class SpringNamespaceObjectTest method startContext.
public static void startContext() {
TestREntity entity = new TestREntity("live-object");
entity.setValue("1");
defaultRedisson.getLiveObjectService().merge(entity);
entity = new TestREntity("live-object-ext");
entity.setValue("1");
defaultRedisson.getLiveObjectService().merge(entity);
System.setProperty("redisAddress", RedisRunner.getDefaultRedisServerBindAddressAndPort());
context = new ClassPathXmlApplicationContext("classpath:org/redisson/spring/support/redisson_objects.xml");
}
Aggregations