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:
James Strachan 2006-07-03 15:23:32 +00:00
parent 96f78a2c08
commit b9d3032246
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}