cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r652916 - in /cxf/trunk: 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:13:59 GMT
Author: dkulp
Date: Fri May  2 14:13:58 2008
New Revision: 652916

URL: http://svn.apache.org/viewvc?rev=652916&view=rev
Log:
[CXF-1562] Allow grabbing factory via META-INF/cxf package

Added:
    cxf/trunk/rt/core/src/main/resources/META-INF/cxf/org.apache.cxf.bus.factory
Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java?rev=652916&r1=652915&r2=652916&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/BusFactory.java Fri May  2 14:13:58 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

Added: cxf/trunk/rt/core/src/main/resources/META-INF/cxf/org.apache.cxf.bus.factory
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/org.apache.cxf.bus.factory?rev=652916&view=auto
==============================================================================
--- cxf/trunk/rt/core/src/main/resources/META-INF/cxf/org.apache.cxf.bus.factory (added)
+++ cxf/trunk/rt/core/src/main/resources/META-INF/cxf/org.apache.cxf.bus.factory Fri May 
2 14:13:58 2008
@@ -0,0 +1,2 @@
+org.apache.cxf.bus.spring.SpringBusFactory
+org.springframework.context.ApplicationContext
\ No newline at end of file



Mime
View raw message