You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2008/03/21 22:37:31 UTC

svn commit: r639867 - in /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws: ClientConfigurationFactory.java description/impl/DescriptionFactoryImpl.java

Author: dims
Date: Fri Mar 21 14:37:29 2008
New Revision: 639867

URL: http://svn.apache.org/viewvc?rev=639867&view=rev
Log:
- Always get the instance of ClientConfigurationFactory from the metadatafactoryregistry, no need to keep in two spots.
- Helper constructor for ClientConfigurationFactory that takes in a repo path and path to axis2.xml

(both needed for AXIS2-3647 - JAXWS Sample - Asynchronous Echo with Async Communication doesn't work)


Modified:
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/ClientConfigurationFactory.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/ClientConfigurationFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/ClientConfigurationFactory.java?rev=639867&r1=639866&r2=639867&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/ClientConfigurationFactory.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/ClientConfigurationFactory.java Fri Mar 21 14:37:29 2008
@@ -40,6 +40,8 @@
     
     private static final Log log = LogFactory.getLog(ClientConfigurationFactory.class);
     private ConfigurationContext configContext = null;
+    private String repoPath = null;
+    private String axisConfigPath = null;
 
     /** Returns a ClientConfigurationFactory object. */
     public static ClientConfigurationFactory newInstance() {
@@ -60,6 +62,17 @@
     }
 
     /**
+     * Create a ConfigurationContext from the specified repository and axis2.xml 
+     * 
+     * @param configurator
+     */
+    public ClientConfigurationFactory(String repoPath,
+            String axisConfigPath) {
+        this.repoPath = repoPath;
+        this.axisConfigPath = axisConfigPath;
+    }
+
+    /**
      * Default constructor
      */
     public ClientConfigurationFactory() {
@@ -76,9 +89,14 @@
             return configContext;
         }
         
-        // Get the system properties for axis2.xml and the repository.
-        String repoPath = getProperty_doPriv(Constants.AXIS2_REPO_PATH);
-        String axisConfigPath = getProperty_doPriv(Constants.AXIS2_CONFIG_PATH);
+        if(repoPath == null)  {
+            // Get the system properties for the repository.
+            repoPath = getProperty_doPriv(Constants.AXIS2_REPO_PATH);
+        }
+        if(axisConfigPath == null) {
+            // Get the system properties for axis2.xml 
+            axisConfigPath = getProperty_doPriv(Constants.AXIS2_CONFIG_PATH);
+        }
         if (log.isDebugEnabled()) {
             log.debug("Axis2 repository path : " + repoPath);
             log.debug("Axis2 Config path : " + axisConfigPath);

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java?rev=639867&r1=639866&r2=639867&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java Fri Mar 21 14:37:29 2008
@@ -60,8 +60,6 @@
  */
 public class DescriptionFactoryImpl {
     private static final Log log = LogFactory.getLog(DescriptionFactoryImpl.class);
-    private static ClientConfigurationFactory clientConfigFactory =
-            ClientConfigurationFactory.newInstance();
     private static Map<DescriptionKey, ServiceDescription> cache =
             new Hashtable<DescriptionKey, ServiceDescription>();
 
@@ -395,11 +393,7 @@
     }
 
     public static ClientConfigurationFactory getClientConfigurationFactory() {
-
-        if (clientConfigFactory == null) {
-            clientConfigFactory = ClientConfigurationFactory.newInstance();
-        }
-        return clientConfigFactory;
+        return ClientConfigurationFactory.newInstance();
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org