mirror of https://github.com/apache/activemq.git
removed dependency on XBeanBrokerService so that a regular Spring XML file can be used that just instantiates BrokerService directly to fix AMQ-790
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@418790 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
96f78a2c08
commit
b9d3032246
|
@ -39,9 +39,9 @@ public class XBeanBrokerFactory implements BrokerFactoryHandler {
|
|||
String uri = config.getSchemeSpecificPart();
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(uri);
|
||||
|
||||
XBeanBrokerService broker = null;
|
||||
BrokerService broker = null;
|
||||
try {
|
||||
broker = (XBeanBrokerService) context.getBean("broker");
|
||||
broker = (BrokerService) context.getBean("broker");
|
||||
}
|
||||
catch (BeansException e) {
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class XBeanBrokerFactory implements BrokerFactoryHandler {
|
|||
String[] names = context.getBeanNamesForType(BrokerService.class);
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
String name = names[i];
|
||||
broker = (XBeanBrokerService) context.getBean(name);
|
||||
broker = (BrokerService) context.getBean(name);
|
||||
if (broker != null) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue