cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1530339 - /cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusWiringBeanFactoryPostProcessor.java
Date Tue, 08 Oct 2013 16:26:56 GMT
Author: dkulp
Date: Tue Oct  8 16:26:55 2013
New Revision: 1530339

URL: http://svn.apache.org/r1530339
Log:
In some cases, setting the context of the bus could cause another listener to ask for the
bus causeing a second bus to be created.   Make sure the current one is registered BEFORE
calling the setContext

Modified:
    cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusWiringBeanFactoryPostProcessor.java

Modified: cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusWiringBeanFactoryPostProcessor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusWiringBeanFactoryPostProcessor.java?rev=1530339&r1=1530338&r2=1530339&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusWiringBeanFactoryPostProcessor.java
(original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/bus/spring/BusWiringBeanFactoryPostProcessor.java
Tue Oct  8 16:26:55 2013
@@ -70,9 +70,9 @@ public class BusWiringBeanFactoryPostPro
                                      boolean create) {
         if (!context.containsBean(name) && (create || Bus.DEFAULT_BUS_ID.equals(name)))
{
             SpringBus b = new SpringBus();
-            b.setApplicationContext(context);
             ConfigurableApplicationContext cctx = (ConfigurableApplicationContext)context;
             cctx.getBeanFactory().registerSingleton(name, b);
+            b.setApplicationContext(context);
         }
         return (Bus)context.getBean(name, Bus.class);
     }



Mime
View raw message