diff --git a/activemq-web/project.xml b/activemq-web/project.xml
index dc34662cf6..0376c5806a 100755
--- a/activemq-web/project.xml
+++ b/activemq-web/project.xml
@@ -43,6 +43,17 @@
${pom.currentVersion}
+
+
+ xbean
+ xbean-spring
+ ${xbean_spring_version}
+ http://www.gbean.org
+
+ true
+
+
+
springframework
@@ -53,11 +64,11 @@
true
-
+
- activeio
- activeio
- ${activeio_version}
+ activeio
+ activeio
+ ${activeio_version}
diff --git a/activemq-web/src/java/org/activemq/web/SpringBrokerContextListener.java b/activemq-web/src/java/org/activemq/web/SpringBrokerContextListener.java
index 46c652afb7..a34d8f91ef 100644
--- a/activemq-web/src/java/org/activemq/web/SpringBrokerContextListener.java
+++ b/activemq-web/src/java/org/activemq/web/SpringBrokerContextListener.java
@@ -17,15 +17,15 @@
**/
package org.activemq.web;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContextEvent;
-import javax.jms.JMSException;
-
import org.activemq.broker.BrokerService;
+import org.activemq.xbean.BrokerFactoryBean;
import org.springframework.core.io.Resource;
import org.springframework.web.context.support.ServletContextResource;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
/**
* Used to configure and instance of ActiveMQ BrokerService using
* ActiveMQ/Spring's xml configuration.
The configuration file is specified
@@ -105,7 +105,13 @@ public class SpringBrokerContextListener implements ServletContextListener {
}
context.log("Loading ActiveMQ Broker configuration from: " + brokerURI);
Resource resource = new ServletContextResource(context, brokerURI);
- // return SpringBrokerServiceFactory.newInstance(resource);
- return null;
+ BrokerFactoryBean factory = new BrokerFactoryBean(resource);
+ try {
+ factory.afterPropertiesSet();
+ }
+ catch (Exception e) {
+ context.log("Failed to create broker: " + e, e);
+ }
+ return factory.getBroker();
}
}