cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1091240 - in /cxf/branches/2.3.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/bus/spring/BusExtensionPostProcessor.java
Date Mon, 11 Apr 2011 22:37:39 GMT
Author: dkulp
Date: Mon Apr 11 22:37:38 2011
New Revision: 1091240

URL: http://svn.apache.org/viewvc?rev=1091240&view=rev
Log:
Merged revisions 1091104 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1091104 | dkulp | 2011-04-11 11:50:24 -0400 (Mon, 11 Apr 2011) | 1 line
  
  [CXF-3447] Don't get teh Bus unless really needed.
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusExtensionPostProcessor.java

Propchange: cxf/branches/2.3.x-fixes/
            ('svn:mergeinfo' removed)

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusExtensionPostProcessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusExtensionPostProcessor.java?rev=1091240&r1=1091239&r2=1091240&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusExtensionPostProcessor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusExtensionPostProcessor.java
Mon Apr 11 22:37:38 2011
@@ -51,9 +51,13 @@ public class BusExtensionPostProcessor i
 
     @SuppressWarnings("unchecked")
     public Object postProcessBeforeInitialization(Object bean, String beanId) throws BeansException
{
-        if (null != getBus() && bean instanceof BusExtension) {
+        if (bean instanceof BusExtension && null != getBus()) {
             Class cls = ((BusExtension)bean).getRegistrationType();
             getBus().setExtension(bean, cls);
+        } else if (bean instanceof Bus && Bus.DEFAULT_BUS_ID.equals(beanId)) {
+            bus = (Bus)bean;
+            bus.setExtension(context, ApplicationContext.class);
+            bus.setExtension(new SpringBeanLocator(context), ConfiguredBeanLocator.class);
         }
         return bean;
     }



Mime
View raw message