activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r427542 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java
Date Tue, 01 Aug 2006 11:40:57 GMT
Author: jstrachan
Date: Tue Aug  1 04:40:57 2006
New Revision: 427542

URL: http://svn.apache.org/viewvc?rev=427542&view=rev
Log:
applied patch from Jason Carreira for AMQ-853 with thanks!

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java?rev=427542&r1=427541&r2=427542&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/BrokerFactoryBean.java
Tue Aug  1 04:40:57 2006
@@ -24,6 +24,8 @@
 import org.springframework.beans.factory.DisposableBean;
 import org.springframework.beans.factory.FactoryBean;
 import org.springframework.beans.factory.InitializingBean;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
 import org.springframework.core.io.Resource;
 import org.apache.xbean.spring.context.ResourceXmlApplicationContext;
 import org.apache.xbean.spring.context.impl.URIEditor;
@@ -39,7 +41,7 @@
  * 
  * @version $Revision: 1.1 $
  */
-public class BrokerFactoryBean implements FactoryBean, InitializingBean, DisposableBean {
+public class BrokerFactoryBean implements FactoryBean, InitializingBean, DisposableBean,
ApplicationContextAware {
     private static final Log log = LogFactory.getLog(BrokerFactoryBean.class);
 
     static {
@@ -50,6 +52,7 @@
     private XBeanBrokerService broker;
     private boolean start = false;
     private ResourceXmlApplicationContext context;
+    private ApplicationContext parentContext;
 
     public BrokerFactoryBean() {
     }
@@ -70,11 +73,15 @@
         return true;
     }
 
+    public void setApplicationContext(ApplicationContext parentContext) throws BeansException
{
+        this.parentContext = parentContext;
+    }
+    
     public void afterPropertiesSet() throws Exception {
         if (config == null) {
             throw new IllegalArgumentException("config property must be set");
         }
-        context = new ResourceXmlApplicationContext(config);
+        context = new ResourceXmlApplicationContext(config, parentContext);
 
         try {
             broker = (XBeanBrokerService) context.getBean("broker");
@@ -130,5 +137,6 @@
     public void setStart(boolean start) {
         this.start = start;
     }
+
 
 }



Mime
View raw message