geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r525270 - in /geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf: CXFWebServiceContainer.java ejb/EJBWebServiceGBean.java
Date Tue, 03 Apr 2007 20:39:52 GMT
Author: gawor
Date: Tue Apr  3 13:39:51 2007
New Revision: 525270

URL: http://svn.apache.org/viewvc?view=rev&rev=525270
Log:
workaround for cxf problems and call destroy() on web container on shutdown/uninstall

Modified:
    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/ejb/EJBWebServiceGBean.java

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?view=diff&rev=525270&r1=525269&r2=525270
==============================================================================
--- 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 Apr  3 13:39:51 2007
@@ -37,6 +37,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
+import org.apache.cxf.binding.BindingFactoryManager;
 import org.apache.cxf.bus.CXFBusFactory;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.tools.common.extensions.soap.SoapAddress;
@@ -65,9 +66,18 @@
         this.bus = bus;
         this.configurationBaseUrl = configurationBaseUrl;
 
+        // XXX: This is a hack to force the default BindingFactoryManager and 
+        // DestinationFactoryManager implementations to be installed first so that
+        // we can overwrite them later.
+        try {
+            bus.getExtension(BindingFactoryManager.class).getBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/http");
+        } catch (Exception e) {
+            LOG.warn("Failed to initialize BindingFactoryManager", e);
+        }
+            
         List ids = new ArrayList();
-        ids.add("http://schemas.xmlsoap.org/wsdl/soap/http");
-        
+        ids.add("http://schemas.xmlsoap.org/soap/http");
+               
         DestinationFactoryManager destinationFactoryManager = bus
                 .getExtension(DestinationFactoryManager.class);
         GeronimoDestinationFactory factory = new GeronimoDestinationFactory(bus);

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ejb/EJBWebServiceGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ejb/EJBWebServiceGBean.java?view=diff&rev=525270&r1=525269&r2=525270
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ejb/EJBWebServiceGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ejb/EJBWebServiceGBean.java
Tue Apr  3 13:39:51 2007
@@ -39,6 +39,7 @@
 
     private SoapHandler soapHandler;
     private String location;
+    private EJBWebServiceContainer container;
 
     public EJBWebServiceGBean(EjbDeployment ejbDeploymentContext,
                               PortInfo portInfo,                              
@@ -71,14 +72,13 @@
                                          configurationBaseUrl, 
                                          "META-INF/jax-ws-catalog.xml");
         
-        EJBWebServiceContainer container = 
-            new EJBWebServiceContainer(bus, configurationBaseUrl, beanClass);
+        this.container = new EJBWebServiceContainer(bus, configurationBaseUrl, beanClass);
         
         ClassLoader classLoader = ejbDeploymentContext.getClassLoader();
         if (soapHandler != null) {
             soapHandler.addWebService(this.location, 
                                       virtualHosts, 
-                                      container, 
+                                      this.container, 
                                       securityRealmName, 
                                       realmName, 
                                       transportGuarantee, 
@@ -94,7 +94,10 @@
     public void doStop() throws Exception {        
         if (this.soapHandler != null) {
             this.soapHandler.removeWebService(this.location);
-        }        
+        } 
+        if (this.container != null) {
+            this.container.destroy();
+        }
     }
 
     public void doFail() {



Mime
View raw message