cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r652923 - in /cxf/branches/2.0.x-fixes: ./ api/src/main/java/org/apache/cxf/BusFactory.java rt/core/src/main/resources/META-INF/cxf/org.apache.cxf.bus.factory
Date Fri, 02 May 2008 21:50:45 GMT
Author: dkulp
Date: Fri May  2 14:50:45 2008
New Revision: 652923

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

........
  r652916 | dkulp | 2008-05-02 17:13:58 -0400 (Fri, 02 May 2008) | 2 lines
  
  [CXF-1562] Allow grabbing factory via META-INF/cxf package
........

Added:
    cxf/branches/2.0.x-fixes/rt/core/src/main/resources/META-INF/cxf/org.apache.cxf.bus.factory
      - copied unchanged from r652916, cxf/trunk/rt/core/src/main/resources/META-INF/cxf/org.apache.cxf.bus.factory
Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java

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

Modified: cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java?rev=652923&r1=652922&r2=652923&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java (original)
+++ cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/BusFactory.java Fri May  2 14:50:45
2008
@@ -195,6 +195,21 @@
             } else {
                 is = classLoader.getResourceAsStream(serviceId);        
             }
+            if (is == null) {
+                serviceId = "META-INF/cxf/" + BusFactory.BUS_FACTORY_PROPERTY_NAME;
+            
+                if (classLoader == null) {
+                    classLoader = Thread.currentThread().getContextClassLoader();
+                }
+            
+                if (classLoader == null) {
+                    is = ClassLoader.getSystemResourceAsStream(serviceId);
+                } else {
+                    is = classLoader.getResourceAsStream(serviceId);        
+                }
+            }
+            
+            
             if (is != null) {
                 BufferedReader rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
                 busFactoryClass = rd.readLine();
@@ -228,3 +243,4 @@
     }
     
 }
+ 
\ No newline at end of file



Mime
View raw message