cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1091109 - in /cxf/branches/2.3.x-fixes: ./ api/src/main/java/org/apache/cxf/BusFactory.java rt/core/src/main/resources/META-INF/services/org.apache.cxf.bus.factory
Date Mon, 11 Apr 2011 16:11:13 GMT
Author: dkulp
Date: Mon Apr 11 16:11:13 2011
New Revision: 1091109

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

........
  r1091006 | dkulp | 2011-04-11 06:16:42 -0400 (Mon, 11 Apr 2011) | 2 lines
  
  Use classloader of the BusFactory when determining if the conditions are
  met since that's the classloader that will matter.
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java
    cxf/branches/2.3.x-fixes/rt/core/src/main/resources/META-INF/services/org.apache.cxf.bus.factory

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

Modified: cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java?rev=1091109&r1=1091108&r2=1091109&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java (original)
+++ cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java Mon Apr 11 16:11:13
2011
@@ -217,6 +217,7 @@ public abstract class BusFactory {
         try {
             busFactoryClass = ClassLoaderUtils.loadClass(className, BusFactory.class)
                 .asSubclass(BusFactory.class);
+            
             instance = busFactoryClass.newInstance();
         } catch (Exception ex) {
             LogUtils.log(LOG, Level.SEVERE, "BUS_FACTORY_INSTANTIATION_EXC", ex);
@@ -276,7 +277,15 @@ public abstract class BusFactory {
             if (isValidBusFactoryClass(busFactoryClass)) {
                 if (busFactoryCondition != null) {
                     try {
-                        classLoader.loadClass(busFactoryCondition);
+                        Class<?> cls =  ClassLoaderUtils.loadClass(busFactoryClass,
BusFactory.class)
+                            .asSubclass(BusFactory.class);
+                        int idx = busFactoryCondition.indexOf(',');
+                        while (idx != -1) {
+                            cls.getClassLoader().loadClass(busFactoryCondition.substring(0,
idx));
+                            busFactoryCondition = busFactoryCondition.substring(idx + 1);
+                            idx = busFactoryCondition.indexOf(',');
+                        }
+                        cls.getClassLoader().loadClass(busFactoryCondition);
                         return busFactoryClass;
                     } catch (ClassNotFoundException e) {
                         return DEFAULT_BUS_FACTORY;

Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/resources/META-INF/services/org.apache.cxf.bus.factory
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/resources/META-INF/services/org.apache.cxf.bus.factory?rev=1091109&r1=1091108&r2=1091109&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/core/src/main/resources/META-INF/services/org.apache.cxf.bus.factory
(original)
+++ cxf/branches/2.3.x-fixes/rt/core/src/main/resources/META-INF/services/org.apache.cxf.bus.factory
Mon Apr 11 16:11:13 2011
@@ -1,2 +1,2 @@
 org.apache.cxf.bus.spring.SpringBusFactory
-org.springframework.context.ApplicationContext
\ No newline at end of file
+org.springframework.context.ApplicationContext,org.springframework.beans.BeansException
\ No newline at end of file



Mime
View raw message