You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by de...@apache.org on 2008/07/15 12:55:52 UTC

svn commit: r676865 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: Constants.java engine/AxisConfiguration.java

Author: deepal
Date: Tue Jul 15 03:55:51 2008
New Revision: 676865

URL: http://svn.apache.org/viewvc?rev=676865&view=rev
Log:
adding a way to specify the module version in the module.xml , you can do that by adding the parameter
<parameter name="version">version_number</parameter>

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java?rev=676865&r1=676864&r2=676865&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java Tue Jul 15 03:55:51 2008
@@ -291,6 +291,8 @@
      * A MessageContext property or client Option stating the JMS correlation id
      */
     public static final String JMS_COORELATION_ID = "JMS_COORELATION_ID";
+
+    public static final String MODULE_VERSION ="version";
     
     public static interface Configuration {
         public static final String ENABLE_REST = "enableREST";
@@ -351,7 +353,7 @@
 
         // if this property is set to Boolean.TRUE then the SOAPAction header, if present,
         // will NOT be set to the value of Options.getAction(). The empty value, "", will
-        // be used instead.
+        // be used instead.                            L
         public static final String DISABLE_SOAP_ACTION = "disableSoapAction";
 
         /**
@@ -394,6 +396,6 @@
          * send extra messages in the backchannel.
          */
         public static final String DISABLE_RESPONSE_ACK = "DisableResponseAck";
-        
+
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java?rev=676865&r1=676864&r2=676865&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java Tue Jul 15 03:55:51 2008
@@ -28,14 +28,7 @@
 import org.apache.axis2.deployment.ModuleDeployer;
 import org.apache.axis2.deployment.repository.util.DeploymentFileData;
 import org.apache.axis2.deployment.util.PhasesInfo;
-import org.apache.axis2.description.AxisDescription;
-import org.apache.axis2.description.AxisModule;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisServiceGroup;
-import org.apache.axis2.description.ModuleConfiguration;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.description.java2wsdl.Java2WSDLConstants;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.phaseresolver.PhaseMetadata;
@@ -210,6 +203,13 @@
     public void addModule(AxisModule module) throws AxisFault {
         module.setParent(this);
 
+        // check whether the module version paramter is there , if so set the module version as that
+        Parameter verisonParamter = module.getParameter(org.apache.axis2.Constants.MODULE_VERSION);
+        if (verisonParamter !=null ) {
+            String version = (String) verisonParamter.getValue();
+            module.setVersion(version);
+        }
+
         if (module.getVersion() == null) {
             if (module.getName().endsWith(AxisModule.VERSION_SNAPSHOT)) {
                 allModules.put(module.getName(), module);