Search in sources :

Example 1 with TrackingFileSystemXmlApplicationContext

use of com.predic8.membrane.core.config.spring.TrackingFileSystemXmlApplicationContext in project service-proxy by membrane.

the class Router method init.

public static Router init(String resource, ClassLoader classLoader) {
    log.debug("loading spring config: " + resource);
    TrackingFileSystemXmlApplicationContext beanFactory = new TrackingFileSystemXmlApplicationContext(new String[] { resource }, false);
    beanFactory.setClassLoader(classLoader);
    beanFactory.refresh();
    beanFactory.start();
    return (Router) beanFactory.getBean("router");
}
Also used : TrackingFileSystemXmlApplicationContext(com.predic8.membrane.core.config.spring.TrackingFileSystemXmlApplicationContext) JmxRouter(com.predic8.membrane.core.jmx.JmxRouter)

Aggregations

TrackingFileSystemXmlApplicationContext (com.predic8.membrane.core.config.spring.TrackingFileSystemXmlApplicationContext)1 JmxRouter (com.predic8.membrane.core.jmx.JmxRouter)1