geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r574694 - in /geronimo/server/trunk: configs/jetty6-deployer/src/main/plan/ configs/jetty6-deployer/src/plan/ configs/tomcat6-deployer/src/main/plan/ configs/tomcat6-deployer/src/plan/ modules/geronimo-cxf/src/main/java/org/apache/geronimo/...
Date Tue, 11 Sep 2007 21:21:15 GMT
Author: gawor
Date: Tue Sep 11 14:21:15 2007
New Revision: 574694

URL: http://svn.apache.org/viewvc?rev=574694&view=rev
Log:
fix the cxf/spring issues by hiding the spring classes and resources from the application
classloader and by making cxf to use cxf/car module classloader to load spring resources instead
of the application classloader

Modified:
    geronimo/server/trunk/configs/jetty6-deployer/src/main/plan/plan.xml
    geronimo/server/trunk/configs/jetty6-deployer/src/plan/plan.xml
    geronimo/server/trunk/configs/tomcat6-deployer/src/main/plan/plan.xml
    geronimo/server/trunk/configs/tomcat6-deployer/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/client/CXFServiceReference.java

Modified: geronimo/server/trunk/configs/jetty6-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty6-deployer/src/main/plan/plan.xml?rev=574694&r1=574693&r2=574694&view=diff
==============================================================================
--- geronimo/server/trunk/configs/jetty6-deployer/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/jetty6-deployer/src/main/plan/plan.xml Tue Sep 11 14:21:15
2007
@@ -170,7 +170,10 @@
             <type>car</type>
           </dependency>
         </dependencies>
-        <hidden-classes/>
+        <hidden-classes>
+          <filter>org.springframework.</filter>
+          <filter>META-INF/spring</filter>
+        </hidden-classes>
         <non-overridable-classes>
           <filter>java.</filter>
           <filter>javax.</filter>

Modified: geronimo/server/trunk/configs/jetty6-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty6-deployer/src/plan/plan.xml?rev=574694&r1=574693&r2=574694&view=diff
==============================================================================
--- geronimo/server/trunk/configs/jetty6-deployer/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/jetty6-deployer/src/plan/plan.xml Tue Sep 11 14:21:15 2007
@@ -130,7 +130,10 @@
                         <type>car</type>
                     </dependency>
                 </dependencies>
-                <hidden-classes/>
+                <hidden-classes>
+                    <filter>org.springframework.</filter>
+                    <filter>META-INF/spring</filter>
+                </hidden-classes>
                 <non-overridable-classes>
                     <filter>java.</filter>
                     <filter>javax.</filter>

Modified: geronimo/server/trunk/configs/tomcat6-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/tomcat6-deployer/src/main/plan/plan.xml?rev=574694&r1=574693&r2=574694&view=diff
==============================================================================
--- geronimo/server/trunk/configs/tomcat6-deployer/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/tomcat6-deployer/src/main/plan/plan.xml Tue Sep 11 14:21:15
2007
@@ -70,7 +70,10 @@
                         <type>car</type>
                     </dependency>
                 </dependencies>
-                <hidden-classes/>
+                <hidden-classes>
+                    <filter>org.springframework.</filter>
+                    <filter>META-INF/spring</filter>
+                </hidden-classes>
                 <non-overridable-classes>
                     <filter>java.</filter>
                     <filter>javax.</filter>

Modified: geronimo/server/trunk/configs/tomcat6-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/tomcat6-deployer/src/plan/plan.xml?rev=574694&r1=574693&r2=574694&view=diff
==============================================================================
--- geronimo/server/trunk/configs/tomcat6-deployer/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/tomcat6-deployer/src/plan/plan.xml Tue Sep 11 14:21:15 2007
@@ -70,7 +70,10 @@
                         <type>car</type>
                     </dependency>
                 </dependencies>
-                <hidden-classes/>
+                <hidden-classes>
+                    <filter>org.springframework.</filter>
+                    <filter>META-INF/spring</filter>
+                </hidden-classes>
                 <non-overridable-classes>
                     <filter>java.</filter>
                     <filter>javax.</filter>

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java?rev=574694&r1=574693&r2=574694&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
Tue Sep 11 14:21:15 2007
@@ -132,8 +132,22 @@
      * be (re)used in other places.
      */
     public static Bus getBus() {        
-        BusFactory.getDefaultBus();
+        getDefaultBus();
         return new ExtensionManagerBus();
     }
-
+    
+    /*
+     * Ensure the Spring bus is initialized with the CXF module classloader
+     * instead of the application classloader. 
+     */
+    public static Bus getDefaultBus() {
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        Thread.currentThread().setContextClassLoader(CXFEndpoint.class.getClassLoader());
+        try {
+            return BusFactory.getDefaultBus();
+        } finally {
+            Thread.currentThread().setContextClassLoader(cl);
+        }
+    }
+    
 }

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/client/CXFServiceReference.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/client/CXFServiceReference.java?rev=574694&r1=574693&r2=574694&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/client/CXFServiceReference.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/client/CXFServiceReference.java
Tue Sep 11 14:21:15 2007
@@ -30,6 +30,7 @@
 import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.javaee.HandlerChainsType;
 import org.apache.geronimo.cxf.CXFHandlerResolver;
+import org.apache.geronimo.cxf.CXFWebServiceContainer;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.jaxws.HandlerChainsUtils;
 import org.apache.geronimo.jaxws.JAXWSAnnotationProcessor;
@@ -52,6 +53,7 @@
     }
        
     public Object getContent() throws NamingException {
+        CXFWebServiceContainer.getDefaultBus();
         Object reference = super.getContent();   
         SAAJInterceptor.registerInterceptors();        
         return reference;



Mime
View raw message