servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1353786 - /servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java
Date Tue, 26 Jun 2012 00:42:47 GMT
Author: ffang
Date: Tue Jun 26 00:42:47 2012
New Revision: 1353786

URL: http://svn.apache.org/viewvc?rev=1353786&view=rev
Log:
[SMX4-1190]saaj-api bundle jar doesn't work when put it in endorsed folder

Modified:
    servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java

Modified: servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java?rev=1353786&r1=1353785&r2=1353786&view=diff
==============================================================================
--- servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java
(original)
+++ servicemix/smx4/specs/trunk/saaj-api-1.3/src/main/java/javax/xml/soap/FactoryFinder.java
Tue Jun 26 00:42:47 2012
@@ -90,7 +90,11 @@ class FactoryFinder {
                 //javax.xml.soap.MetaFactory at all
                 factoryClassName = "javax.xml.soap.SAAJMetaFactory";
             }
-            Class factoryClass = FactoryFinder.class.getClassLoader().loadClass(factoryClassName);
+            ClassLoader cl = FactoryFinder.class.getClassLoader();
+            if (cl == null) {
+            	cl = Thread.currentThread().getContextClassLoader();
+            }
+            Class factoryClass = cl.loadClass(factoryClassName);
             Class spiClass = org.apache.servicemix.specs.locator.OsgiLocator.locate(factoryClass,
factoryPropertyName);
             if (spiClass != null) {
                 return spiClass.newInstance();



Mime
View raw message