1 18 package org.apache.activemq.transport.http; 19 20 import org.apache.activemq.broker.BrokerService; 21 import org.apache.activemq.xbean.BrokerFactoryBean; 22 import org.springframework.core.io.ClassPathResource; 23 24 25 31 public class HttpSpringEmbeddedTunnelServlet extends HttpEmbeddedTunnelServlet { 32 33 private static final long serialVersionUID = -6568661997192814908L; 34 35 38 protected BrokerService createBroker() throws Exception { 39 40 String configFile = getServletContext().getInitParameter("org.activemq.config.file"); 41 if (configFile == null) { 42 configFile="activemq.xml"; 43 } 44 45 BrokerFactoryBean factory = new BrokerFactoryBean(new ClassPathResource(configFile)); 46 factory.afterPropertiesSet(); 47 48 return factory.getBroker(); 49 } 50 51 } 52 | Popular Tags |