use of org.springframework.context.support.ClassPathXmlApplicationContext in project camel by apache.
the class Main method getParentApplicationContext.
public AbstractApplicationContext getParentApplicationContext() {
if (parentApplicationContext == null) {
if (parentApplicationContextUri != null) {
parentApplicationContext = new ClassPathXmlApplicationContext(parentApplicationContextUri);
parentApplicationContext.start();
}
}
return parentApplicationContext;
}
use of org.springframework.context.support.ClassPathXmlApplicationContext in project camel by apache.
the class Main method createDefaultApplicationContext.
protected AbstractApplicationContext createDefaultApplicationContext() throws IOException {
ApplicationContext parentContext = getParentApplicationContext();
// file based
if (getFileApplicationContextUri() != null) {
String[] args = getFileApplicationContextUri().split(";");
if (parentContext != null) {
return new FileSystemXmlApplicationContext(args, parentContext);
} else {
return new FileSystemXmlApplicationContext(args);
}
}
// default to classpath based
String[] args = getApplicationContextUri().split(";");
if (parentContext != null) {
return new ClassPathXmlApplicationContext(args, parentContext);
} else {
return new ClassPathXmlApplicationContext(args);
}
}
use of org.springframework.context.support.ClassPathXmlApplicationContext in project camel by apache.
the class SpringMarshalDomainObjectJSONTest method createCamelContext.
protected CamelContext createCamelContext() throws Exception {
setUseRouteBuilder(false);
final AbstractXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/dataformat/xstream/SpringMarshalDomainObjectJSONTest.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 SpringMarshalListTest method createCamelContext.
protected CamelContext createCamelContext() throws Exception {
setUseRouteBuilder(false);
final AbstractXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/dataformat/xstream/SpringMarshalListTest.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 SpringXStreamConfigurationTest method createCamelContext.
protected CamelContext createCamelContext() throws Exception {
setUseRouteBuilder(false);
final AbstractXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/dataformat/xstream/SpringXStreamConfigurationTest.xml");
setCamelContextService(new Service() {
public void start() throws Exception {
applicationContext.start();
}
public void stop() throws Exception {
applicationContext.stop();
}
});
return SpringCamelContext.springCamelContext(applicationContext);
}
Aggregations