/**
* Factory method to create a new ActiveMQ Broker
*/
protected BrokerService createBroker(ServletContext context) {
String brokerURI = context.getInitParameter(INIT_PARAM_BROKER_URI);
if (brokerURI == null) {
brokerURI = "activemq.xml";
}
context.log("Loading ActiveMQ Broker configuration from: " + brokerURI);
Resource resource = new ServletContextResource(context, brokerURI);
BrokerFactoryBean factory = new BrokerFactoryBean(resource);
try {
factory.afterPropertiesSet();
} catch (Exception e) {
context.log("Failed to create broker: " + e, e);
}
return factory.getBroker();
}
ActiveMQContextListener.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:t4f-data
作者:
评论列表
文章目录