geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r562167 - in /geronimo/server/branches/2.0/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2: Axis2WebServiceContainer.java client/Axis2ConfigGBean.java
Date Thu, 02 Aug 2007 16:23:22 GMT
Author: gawor
Date: Thu Aug  2 09:23:13 2007
New Revision: 562167

URL: http://svn.apache.org/viewvc?view=rev&rev=562167
Log:
fixes the ClientConfigurationFactory registration problem described in GERONIMO-3368

Modified:
    geronimo/server/branches/2.0/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
    geronimo/server/branches/2.0/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ConfigGBean.java

Modified: geronimo/server/branches/2.0/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java?view=diff&rev=562167&r1=562166&r2=562167
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
Thu Aug  2 09:23:13 2007
@@ -63,6 +63,7 @@
 import org.apache.axis2.util.MessageContextBuilder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.axis2.client.Axis2ConfigGBean;
 import org.apache.geronimo.jaxws.JAXWSAnnotationProcessor;
 import org.apache.geronimo.jaxws.JAXWSUtils;
 import org.apache.geronimo.jaxws.JNDIResolver;
@@ -109,6 +110,9 @@
 
     public void init() throws Exception {
         this.endpointClass = classLoader.loadClass(this.endpointClassName);
+        
+        Axis2ConfigGBean.registerClientConfigurationFactory();
+        
         configurationContext = ConfigurationContextFactory.createBasicConfigurationContext("META-INF/geronimo-axis2.xml");
 
         // check to see if the wsdlLocation property is set in portInfo,

Modified: geronimo/server/branches/2.0/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ConfigGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ConfigGBean.java?view=diff&rev=562167&r1=562166&r2=562167
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ConfigGBean.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ConfigGBean.java
Thu Aug  2 09:23:13 2007
@@ -46,7 +46,7 @@
         this.classLoder = classLoader;
     }
 
-    private synchronized static Axis2ClientConfigurationFactory registerClientConfigurationFactory()
{
+    public synchronized static Axis2ClientConfigurationFactory registerClientConfigurationFactory()
{
         ClientConfigurationFactory factory =
             (ClientConfigurationFactory)MetadataFactoryRegistry.getFactory(ClientConfigurationFactory.class);
         if (factory instanceof Axis2ClientConfigurationFactory) {
@@ -55,6 +55,10 @@
             factory = new Axis2ClientConfigurationFactory(false);
             MetadataFactoryRegistry.setFactory(ClientConfigurationFactory.class, factory);
             LOG.debug("Registered client configuration factory: " + factory);
+            // ensure that the factory was installed at the right time
+            if (factory != DescriptionFactoryImpl.getClientConfigurationFactory()) {
+                throw new RuntimeException("Client configuration factory was registered too
late");           
+            }
             return (Axis2ClientConfigurationFactory)factory;
         }
     }



Mime
View raw message