axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r428111 - in /webservices/axis2/trunk/java/modules/core: src/org/apache/axis2/deployment/AxisConfigBuilder.java src/org/apache/axis2/deployment/DeploymentEngine.java test/org/apache/axis2/deployment/BadModuleTest.java
Date Wed, 02 Aug 2006 19:41:20 GMT
Author: dims
Date: Wed Aug  2 12:41:20 2006
New Revision: 428111

URL: http://svn.apache.org/viewvc?rev=428111&view=rev
Log:
Trying to reduce coupling between AxisConfigBuilder and DeploymentEngine


Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BadModuleTest.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java?rev=428111&r1=428110&r2=428111&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
Wed Aug  2 12:41:20 2006
@@ -40,17 +40,18 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
+import java.util.Collection;
 
 public class AxisConfigBuilder extends DescriptionBuilder {
 
     protected static final Log log = LogFactory.getLog(AxisConfigBuilder.class);
 
-    private DeploymentEngine engine;
+    private List moduleList = new ArrayList();
 
-    public AxisConfigBuilder(InputStream serviceInputStream, DeploymentEngine engine,
+    public AxisConfigBuilder(InputStream serviceInputStream,
                              AxisConfiguration axisConfiguration) {
         super(serviceInputStream, axisConfiguration);
-        this.engine = engine;
     }
 
     public void populateConfig() throws DeploymentException {
@@ -157,9 +158,7 @@
     }
 
     /**
-     * Gets the list of modules that is required to be engaged globally.
-     *
-     * @param moduleRefs <code>java.util.Iterator</code>
+     * Update the list of modules that is required to be engaged globally.
      */
     protected void processModuleRefs(Iterator moduleRefs) {
         while (moduleRefs.hasNext()) {
@@ -167,7 +166,7 @@
             OMAttribute moduleRefAttribute = moduleref.getAttribute(new QName(TAG_REFERENCE));
             String refName = moduleRefAttribute.getAttributeValue();
 
-            engine.addModule(new QName(refName));
+            moduleList.add(new QName(refName));
         }
     }
 
@@ -395,5 +394,12 @@
         }
         Class phaseClass = axisConfig.getSystemClassLoader().loadClass(className);
         return (Phase) phaseClass.newInstance();
+    }
+
+    /**
+     * Gets the list of modules that is required to be engaged globally.
+     */
+    protected Collection getGlobalModules() {
+        return moduleList;
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=428111&r1=428110&r2=428111&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
Wed Aug  2 12:41:20 2006
@@ -765,7 +765,8 @@
      */
     public AxisConfiguration populateAxisConfiguration(InputStream in) throws DeploymentException
{
         axisConfig = new AxisConfiguration();
-        AxisConfigBuilder builder = new AxisConfigBuilder(in, this, axisConfig);
+        AxisConfigBuilder builder = new AxisConfigBuilder(in, axisConfig);
+        moduleList.addAll(builder.getGlobalModules());
         builder.populateConfig();
         try {
             if (in != null) {

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BadModuleTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BadModuleTest.java?rev=428111&r1=428110&r2=428111&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BadModuleTest.java
(original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BadModuleTest.java
Wed Aug  2 12:41:20 2006
@@ -36,7 +36,7 @@
             InputStream in = new FileInputStream(
                     getTestResourceFile("deployment/Badmodule.xml"));
             AxisConfiguration glabl = new AxisConfiguration();
-            AxisConfigBuilder builder =new AxisConfigBuilder(in,null,glabl);
+            AxisConfigBuilder builder =new AxisConfigBuilder(in, glabl);
             builder.populateConfig();
             fail(
                     "this must failed gracefully with DeploymentException or FileNotFoundException");



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


Mime
View raw message