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 2006/03/06 06:30:20 UTC

svn commit: r383472 - in /webservices/axis2/trunk/java/modules: core/conf/ core/src/org/apache/axis2/context/ core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/description/ core/src/org/apache/axis2/engine/ core/src/org/apache/axis2/phase...

Author: deepal
Date: Sun Mar  5 21:30:18 2006
New Revision: 383472

URL: http://svn.apache.org/viewcvs?rev=383472&view=rev
Log:
-module dis-engagement DONE
- when Axis2 receive a fault (say HTTP500) it will invoke inFaultFlow
- remove host configuration
-removed transport handler chain , since no body is using that
-rename global in flow get method (from long name)

Added:
    webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/
    webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/
    webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/
    webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/META-INF/
    webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/META-INF/module.xml
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/ModuleDisEngagementTest.java
Removed:
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/HostCongigurationTest.java
Modified:
    webservices/axis2/trunk/java/modules/core/conf/axis2.xml
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/InvalidPhaseRuleTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PhaseRuleTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PreDispatchPhaseRuleTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/FaultHandlingTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java

Modified: webservices/axis2/trunk/java/modules/core/conf/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/conf/axis2.xml?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/conf/axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/core/conf/axis2.xml Sun Mar  5 21:30:18 2006
@@ -13,11 +13,6 @@
     <parameter name="password" locked="false">axis2</parameter>
 
     <parameter name="seralizeLocation" locked="false">.</parameter>
-    <hostConfiguration>
-        <ip>127.0.0.1</ip>
-        <port>5555</port>
-    </hostConfiguration>
-
 
     <!--if you want to extract the service archive file and work with that please uncomment this-->
     <!--else , it wont extract archive file or does not take into consideration if someone drop-->
@@ -81,7 +76,8 @@
         <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
         <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
     </transportSender>
-    <transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
         <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
         <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
     </transportSender>

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java Sun Mar  5 21:30:18 2006
@@ -9,8 +9,6 @@
 import org.apache.axis2.engine.AxisConfigurator;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.modules.Module;
-import org.apache.axis2.phaseresolver.PhaseException;
-import org.apache.axis2.phaseresolver.PhaseResolver;
 import org.apache.axis2.transport.TransportSender;
 import org.apache.commons.logging.LogFactory;
 
@@ -57,13 +55,8 @@
 
     private static void init(ConfigurationContext configContext) throws AxisFault {
         try {
-            PhaseResolver phaseResolver = new PhaseResolver(configContext.getAxisConfiguration());
-
-            phaseResolver.buildTranspotsChains();
             initModules(configContext);
             initTransportSenders(configContext);
-        } catch (PhaseException e) {
-            throw new AxisFault(e);
         } catch (DeploymentException e) {
             throw new AxisFault(e);
         }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java Sun Mar  5 21:30:18 2006
@@ -37,8 +37,10 @@
     protected Options options;
 
     public final static int IN_FLOW = 1;
+    public final static int IN_FAULT_FLOW = 3;
 
     public final static int OUT_FLOW = 2;
+    public final static int OUT_FAUTT_FLOW = 4;
 
     public static final String REMOTE_ADDR = "REMOTE_ADDR";
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java?rev=383472&r1=383471&r2=383472&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 Sun Mar  5 21:30:18 2006
@@ -29,7 +29,6 @@
 import org.apache.axis2.phaseresolver.PhaseException;
 import org.apache.axis2.transport.TransportListener;
 import org.apache.axis2.transport.TransportSender;
-import org.apache.axis2.util.HostConfiguration;
 import org.apache.ws.commons.om.OMAttribute;
 import org.apache.ws.commons.om.OMElement;
 
@@ -100,13 +99,6 @@
 
             processModuleConfig(moduleConfigs, axisConfig, axisConfig);
 
-            // setting host configuration
-            OMElement hostElement = config_element.getFirstChildWithName(new QName(TAG_HOST_CONFIG));
-
-            if (hostElement != null) {
-                processHostCongiguration(hostElement, axisConfig);
-            }
-
             // processing <wsp:Policy> .. </..> elements
             Iterator policyElements = config_element.getChildrenWithName(new QName(POLICY_NS_URI,
                     TAG_POLICY));
@@ -133,26 +125,6 @@
         } catch (XMLStreamException e) {
             throw new DeploymentException(e);
         }
-    }
-
-    private void processHostCongiguration(OMElement element, AxisConfiguration config) {
-        OMElement ipele = element.getFirstChildWithName(new QName("ip"));
-        String ip = null;
-        int port = -1;
-
-        if (ipele != null) {
-            ip = ipele.getText().trim();
-        }
-
-        OMElement portele = element.getFirstChildWithName(new QName("port"));
-
-        if (portele != null) {
-            port = Integer.parseInt(portele.getText().trim());
-        }
-
-        HostConfiguration hostconfig = new HostConfiguration(ip, port);
-
-        config.setHostConfiguration(hostconfig);
     }
 
     protected void processModuleConfig(Iterator moduleConfigs, ParameterInclude parent,

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java Sun Mar  5 21:30:18 2006
@@ -40,7 +40,6 @@
     String TAG_MESSAGE = "message";
     String TAG_LISTENER = "listener";
     String TAG_LABEL = "label";
-    String TAG_HOST_CONFIG = "hostConfiguration";
     String TAG_HANDLER = "handler";
     String TAG_TYPE = "type";
     String TAG_TRANSPORT_SENDER = "transportSender";

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml Sun Mar  5 21:30:18 2006
@@ -13,11 +13,6 @@
     <parameter name="password" locked="false">axis2</parameter>
 
     <parameter name="seralizeLocation" locked="false">.</parameter>
-    <hostConfiguration>
-        <ip>127.0.0.1</ip>
-        <port>5555</port>
-    </hostConfiguration>
-
 
     <!--if you want to extract the service archive file and work with that please uncomment this-->
     <!--else , it wont extract archive file or does not take into consideration if someone drop-->
@@ -119,22 +114,22 @@
                      class="org.apache.axis2.engine.RequestURIBasedDispatcher">
                 <order phase="Dispatch"/>
             </handler>
-            
+
             <handler name="SOAPActionBasedDispatcher"
                      class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
                 <order phase="Dispatch"/>
             </handler>
-            
+
             <handler name="AddressingBasedDispatcher"
                      class="org.apache.axis2.engine.AddressingBasedDispatcher">
                 <order phase="Dispatch"/>
             </handler>
-            
+
             <handler name="SOAPMessageBodyBasedDispatcher"
                      class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
                 <order phase="Dispatch"/>
             </handler>
-            
+
             <handler name="InstanceDispatcher"
                      class="org.apache.axis2.engine.InstanceDispatcher">
                 <order phase="PostDispatch"/>

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java Sun Mar  5 21:30:18 2006
@@ -106,4 +106,10 @@
     }
 
     public abstract Object getKey();
+
+    /**
+     * To check whether a given module has engaged to parenet
+     * @param moduleName
+     * @return
+     */
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java Sun Mar  5 21:30:18 2006
@@ -135,6 +135,28 @@
         return addModuleOperations(moduleref, axisConfig, (AxisService) getParent());
     }
 
+    public void disEngageModule(AxisModule module) {
+        if (module != null) {
+            if (getParent() != null) {
+                AxisService service = (AxisService) getParent();
+                AxisConfiguration axiConfiguration = service.getAxisConfiguration();
+                PhaseResolver phaseResolver = new PhaseResolver(axiConfiguration);
+                if (service.isEngaged(module.getName())) {
+                    phaseResolver.disEngageModulefromOperationChian(module, this);
+                } else if (axiConfiguration != null &&
+                        axiConfiguration.isEngaged(module.getName())) {
+                    phaseResolver.disEngageModulefromOperationChian(module, this);
+                } else {
+                    if (axiConfiguration != null) {
+                        phaseResolver.disEngageModulefromGlobalChains(module);
+                    }
+                    phaseResolver.disEngageModulefromOperationChian(module, this);
+                }
+            }
+            engagedModules.remove(module);
+        }
+    }
+
 
     /**
      * Adds an operation to a service if a module is required to do so.

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java Sun Mar  5 21:30:18 2006
@@ -24,6 +24,7 @@
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.modules.Module;
+import org.apache.axis2.phaseresolver.PhaseResolver;
 import org.apache.axis2.transport.TransportListener;
 import org.apache.axis2.util.PolicyUtil;
 import org.apache.axis2.wsdl.builder.SchemaGenerator;
@@ -343,7 +344,7 @@
         PolicyUtil.writePolicy(axisOperation.getPolicyInclude(), out);
     }
 
-    private AxisConfiguration getAxisConfiguration() {
+    public AxisConfiguration getAxisConfiguration() {
         if (getParent() != null) return (AxisConfiguration) getParent().getParent();
         return null;
     }
@@ -804,5 +805,40 @@
             enableAllTransport = false;
             this.exposeTransports = exposeTransports;
         }
+    }
+
+    public void disEngageModule(AxisModule module) {
+        AxisConfiguration axisConfig = getAxisConfiguration();
+        if (axisConfig != null) {
+            PhaseResolver phaseResolver = new PhaseResolver(axisConfig);
+            if (axisConfig.isEngaged(module.getName())) {
+                Iterator operations = getChildren();
+                while (operations.hasNext()) {
+                    AxisOperation axisOperation = (AxisOperation) operations.next();
+                    phaseResolver.disEngageModulefromOperationChian(module, axisOperation);
+                }
+            } else {
+                if (isEngaged(module.getName())) {
+                    phaseResolver.disEngageModulefromGlobalChains(module);
+                    Iterator operations = getChildren();
+                    while (operations.hasNext()) {
+                        AxisOperation axisOperation = (AxisOperation) operations.next();
+                        phaseResolver.disEngageModulefromOperationChian(module, axisOperation);
+                    }
+                }
+            }
+        }
+        engagedModules.remove(module);
+    }
+
+    public boolean isEngaged(QName moduleName) {
+        Iterator engagedModuleItr = engagedModules.iterator();
+        while (engagedModuleItr.hasNext()) {
+            AxisModule axisModule = (AxisModule) engagedModuleItr.next();
+            if (axisModule.getName().getLocalPart().equals(moduleName.getLocalPart())) {
+                return true;
+            }
+        }
+        return false;
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java Sun Mar  5 21:30:18 2006
@@ -24,7 +24,7 @@
 import org.apache.axis2.deployment.repository.util.ArchiveReader;
 import org.apache.axis2.deployment.util.PhasesInfo;
 import org.apache.axis2.description.*;
-import org.apache.axis2.util.HostConfiguration;
+import org.apache.axis2.phaseresolver.PhaseResolver;
 import org.apache.axis2.util.Utils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -69,8 +69,6 @@
      */
     private Hashtable faultyServices;
 
-    // to store host configuration if any
-    private HostConfiguration hostConfiguration;
     private ArrayList inFaultPhases;
     private ArrayList inPhasesUptoAndIncludingPostDispatch;
     private HashMap messageReceivers;
@@ -244,7 +242,7 @@
                 module = loadModulefromResources(moduleName);
             }
         }
-        engageModule(module, moduleref);
+        engageModule(module);
     }
 
     /**
@@ -259,25 +257,26 @@
         AxisModule module = getModule(moduleQName);
         if (module == null) {
             module = loadModulefromResources(moduleQName.getLocalPart());
-            engageModule(module, moduleQName);
+            engageModule(module);
         } else {
-            engageModule(module, moduleQName);
+            engageModule(module);
         }
 
     }
 
-    private void engageModule(AxisModule module, QName moduleQName) throws AxisFault {
+    private void engageModule(AxisModule module) throws AxisFault {
+        QName moduleQName;
         if (module != null) {
             for (Iterator iterator = engagedModules.iterator(); iterator.hasNext();) {
                 QName qName = (QName) iterator.next();
+                moduleQName = module.getName();
                 if (moduleQName.equals(qName)) {
                     log.info("Attempt to engage an already engaged module " + qName);
                     return;
                 }
             }
         } else {
-            throw new AxisFault(this + " Refer to invalid module " + moduleQName.getLocalPart()
-                    + " has not bean deployed yet !");
+            throw new AxisFault(this + " Refer to invalid module , has not bean deployed yet !");
         }
         Iterator servicegroups = getServiceGroups();
         while (servicegroups.hasNext()) {
@@ -288,6 +287,26 @@
     }
 
     /**
+     * To dis-engage module from the system,
+     * this will remove all the handlers belongs to this module
+     * from all the handler chains
+     *
+     * @param module
+     */
+    public void disEngageModule(AxisModule module) {
+        if (module != null && isEngaged(module.getName())) {
+            PhaseResolver phaseResolver = new PhaseResolver(this);
+            phaseResolver.disEngageModulefromGlobalChains(module);
+            Iterator serviceItr = getServices().values().iterator();
+            while (serviceItr.hasNext()) {
+                AxisService axisService = (AxisService) serviceItr.next();
+                axisService.disEngageModule(module);
+            }
+            engagedModules.remove(module.getName());
+        }
+    }
+
+    /**
      * Loads module from class path - the mar files in a jar file inside
      * modules/    directory
      *
@@ -364,10 +383,6 @@
         return this.outPhases;
     }
 
-    public HostConfiguration getHostConfiguration() {
-        return this.hostConfiguration;
-    }
-
     /**
      * @return Returns ArrayList.
      */
@@ -375,7 +390,7 @@
         return inFaultPhases;
     }
 
-    public ArrayList getInPhasesUptoAndIncludingPostDispatch() {
+    public ArrayList getGlobalInFlow() {
         return inPhasesUptoAndIncludingPostDispatch;
     }
 
@@ -538,11 +553,6 @@
 
     public void setGlobalOutPhase(ArrayList outPhases) {
         this.outPhases = outPhases;
-    }
-
-    // to set and get host configuration
-    public void setHostConfiguration(HostConfiguration hostConfiguration) {
-        this.hostConfiguration = hostConfiguration;
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java Sun Mar  5 21:30:18 2006
@@ -35,16 +35,7 @@
 import org.apache.ws.commons.om.OMAbstractFactory;
 import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.om.OMNamespace;
-import org.apache.ws.commons.soap.SOAP11Constants;
-import org.apache.ws.commons.soap.SOAP12Constants;
-import org.apache.ws.commons.soap.SOAPConstants;
-import org.apache.ws.commons.soap.SOAPEnvelope;
-import org.apache.ws.commons.soap.SOAPFault;
-import org.apache.ws.commons.soap.SOAPFaultCode;
-import org.apache.ws.commons.soap.SOAPFaultDetail;
-import org.apache.ws.commons.soap.SOAPFaultReason;
-import org.apache.ws.commons.soap.SOAPHeaderBlock;
-import org.apache.ws.commons.soap.SOAPProcessingException;
+import org.apache.ws.commons.soap.*;
 
 import javax.xml.namespace.QName;
 import java.util.ArrayList;
@@ -161,8 +152,7 @@
                 processingContext.getProperty(MessageContext.CHARACTER_SET_ENCODING));
 
         // register the fault message context
-        if (processingContext.getAxisOperation() != null && processingContext.getOperationContext() != null)
-        {
+        if (processingContext.getAxisOperation() != null && processingContext.getOperationContext() != null) {
             processingContext.getAxisOperation().addFaultMessageContext(faultContext, processingContext.getOperationContext());
         }
 
@@ -177,8 +167,7 @@
         EndpointReference faultTo = processingContext.getFaultTo();
         if (faultTo != null) {
             faultContext.setTo(processingContext.getFaultTo());
-        } else if (processingContext.getEnvelope().getHeader() != null && processingContext.getEnvelope().getHeader().getFirstChildWithName(new QName("FaultTo")) != null)
-        {
+        } else if (processingContext.getEnvelope().getHeader() != null && processingContext.getEnvelope().getHeader().getFirstChildWithName(new QName("FaultTo")) != null) {
             OMElement faultToElement = processingContext.getEnvelope().getHeader().getFirstChildWithName(new QName("FaultTo"));
             faultTo = new EndpointReference("");
             faultTo.fromOM(faultToElement);
@@ -288,9 +277,7 @@
             fault.setCode((SOAPFaultCode) faultCode);
         } else if (soapException != null) {
             soapFaultCode = soapException.getFaultCode();
-        } else
-        if (((exception = e) instanceof AxisFault || (exception = e.getCause()) instanceof AxisFault))
-        {
+        } else if (((exception = e) instanceof AxisFault || (exception = e.getCause()) instanceof AxisFault)) {
             QName faultCodeQName = ((AxisFault) exception).getFaultCode();
             if (faultCodeQName != null) {
                 if (faultCodeQName.getLocalPart().indexOf(":") == -1) {
@@ -320,7 +307,7 @@
             message = fault.getReason().getSOAPText().getText();
         } else if (soapException != null) {
             message = soapException.getMessage();
-        } else if (((exception = e) instanceof AxisFault || (exception = e.getCause()) instanceof AxisFault)){
+        } else if (((exception = e) instanceof AxisFault || (exception = e.getCause()) instanceof AxisFault)) {
             message = ((AxisFault) exception).getReason();
             message = message != null && "".equals(message) ? message : e.getMessage();
 
@@ -375,7 +362,7 @@
     public void receive(MessageContext msgContext) throws AxisFault {
         ConfigurationContext confContext = msgContext.getConfigurationContext();
         ArrayList preCalculatedPhases =
-                confContext.getAxisConfiguration().getInPhasesUptoAndIncludingPostDispatch();
+                confContext.getAxisConfiguration().getGlobalInFlow();
 
         // Set the initial execution chain in the MessageContext to a *copy* of what
         // we got above.  This allows individual message processing to change the chain without
@@ -466,7 +453,16 @@
      * @throws AxisFault
      */
     public void receiveFault(MessageContext msgContext) throws AxisFault {
-        // TODO : rationalize fault handling!
+        log.info("Received Error Message with id " + msgContext.getMessageID());
+        ConfigurationContext confContext = msgContext.getConfigurationContext();
+        ArrayList preCalculatedPhases =
+                confContext.getAxisConfiguration().getInFaultFlow();
+        // Set the initial execution chain in the MessageContext to a *copy* of what
+        // we got above.  This allows individual message processing to change the chain without
+        // affecting later messages.
+        msgContext.setExecutionChain((ArrayList) preCalculatedPhases.clone());
+        msgContext.setFLOW(MessageContext.IN_FAULT_FLOW);
+        invoke(msgContext);
     }
 
     public void resume(MessageContext msgctx) throws AxisFault {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java Sun Mar  5 21:30:18 2006
@@ -35,9 +35,9 @@
  */
 public class Phase implements Handler {
 
-	private static final long serialVersionUID = -3352439587370050957L;
+    private static final long serialVersionUID = -3352439587370050957L;
 
-	/**
+    /**
      * Field BOTH_BEFORE_AFTER
      */
     private static final int BOTH_BEFORE_AFTER = 0;
@@ -431,7 +431,7 @@
     }
 
     public HandlerDescription getHandlerDesc() {
-        return null;    
+        return null;
     }
 
     /**
@@ -448,7 +448,7 @@
     }
 
     public Parameter getParameter(String name) {
-        return null;    
+        return null;
     }
 
     /**
@@ -513,4 +513,20 @@
                     + phaseLast.getName());
         }
     }
+
+    /**
+     * To remove a given hnadler from a phase
+     *
+     * @param handler
+     */
+    public void removeHandler(HandlerDescription handler) {
+        if (handlers.remove(handler.getHandler())) {
+            log.info("removed handler " + handler.getName().getLocalPart()
+                    + " from the phase " + phaseName);
+        } else {
+            log.info("unable to remove handler " + handler.getName().getLocalPart()
+                    + " from the phase " + phaseName);
+        }
+    }
+
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java Sun Mar  5 21:30:18 2006
@@ -17,19 +17,21 @@
 
 package org.apache.axis2.phaseresolver;
 
-import org.apache.axis2.description.*;
+import org.apache.axis2.description.AxisModule;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.Flow;
+import org.apache.axis2.description.HandlerDescription;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Phase;
 
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
 import java.util.Iterator;
 
 /**
  * Class PhaseResolver
  */
 public class PhaseResolver {
+
     private static final int IN_FLOW = 1;
     private static final int OUT_FAULT_FLOW = 5;
 
@@ -46,115 +48,10 @@
     /**
      * default constructor , to obuild chains for GlobalDescription
      *
-     * @param engineConfig
+     * @param axisconfig
      */
-    public PhaseResolver(AxisConfiguration engineConfig) {
-        this.axisConfig = engineConfig;
-    }
-
-    private void buildINTransportChains(TransportInDescription transport) throws PhaseException {
-        Flow flow = null;
-        Phase phase = null;
-
-        for (int type = IN_FLOW; type < OUT_FAULT_FLOW; type++) {
-            switch (type) {
-                case PhaseMetadata.IN_FLOW : {
-                    flow = transport.getInFlow();
-                    phase = transport.getInPhase();
-
-                    break;
-                }
-
-                case PhaseMetadata.FAULT_IN_FLOW : {
-                    flow = transport.getFaultFlow();
-                    phase = transport.getFaultPhase();
-
-                    break;
-                }
-            }
-
-            if (flow != null) {
-                ArrayList handlers = new ArrayList();
-
-                for (int j = 0; j < flow.getHandlerCount(); j++) {
-                    HandlerDescription metadata = flow.getHandler(j);
-
-                    metadata.getRules().setPhaseName(PhaseMetadata.TRANSPORT_PHASE);
-                    handlers.add(metadata);
-                }
-
-                new PhaseHolder().buildTransportHandlerChain(phase, handlers);
-            } else {
-            }
-        }
-    }
-
-    /**
-     * Method buildTransportChains
-     *
-     * @param transport
-     * @throws PhaseException
-     */
-    private void buildOutTransportChains(TransportOutDescription transport) throws PhaseException {
-        Flow flow = null;
-        Phase phase = null;
-
-        for (int type = IN_FLOW; type < OUT_FAULT_FLOW; type++) {
-            switch (type) {
-                case PhaseMetadata.OUT_FLOW : {
-                    flow = transport.getOutFlow();
-                    phase = transport.getOutPhase();
-
-                    break;
-                }
-
-                case PhaseMetadata.FAULT_OUT_FLOW : {
-                    flow = transport.getFaultFlow();
-                    phase = transport.getFaultPhase();
-
-                    break;
-                }
-            }
-
-            if (flow != null) {
-                ArrayList handlers = new ArrayList();
-
-                for (int j = 0; j < flow.getHandlerCount(); j++) {
-                    HandlerDescription metadata = flow.getHandler(j);
-
-                    metadata.getRules().setPhaseName(PhaseMetadata.TRANSPORT_PHASE);
-                    handlers.add(metadata);
-                }
-
-                new PhaseHolder().buildTransportHandlerChain(phase, handlers);
-            } else {
-            }
-        }
-    }
-
-    /**
-     * Method buildTranspotsChains
-     *
-     * @throws PhaseException
-     */
-    public void buildTranspotsChains() throws PhaseException {
-        HashMap axisTransportIn = axisConfig.getTransportsIn();
-        HashMap axisTransportOut = axisConfig.getTransportsOut();
-        Collection colintrnsport = axisTransportIn.values();
-
-        for (Iterator iterator = colintrnsport.iterator(); iterator.hasNext();) {
-            TransportInDescription transport = (TransportInDescription) iterator.next();
-
-            buildINTransportChains(transport);
-        }
-
-        Collection colouttrnsport = axisTransportOut.values();
-
-        for (Iterator iterator = colouttrnsport.iterator(); iterator.hasNext();) {
-            TransportOutDescription transport = (TransportOutDescription) iterator.next();
-
-            buildOutTransportChains(transport);
-        }
+    public PhaseResolver(AxisConfiguration axisconfig) {
+        this.axisConfig = axisconfig;
     }
 
     public void engageModuleToOperation(AxisOperation axisOperation, AxisModule module)
@@ -168,7 +65,7 @@
 
                     if (axisConfig != null) {
                         Iterator itr_axis_config =
-                                axisConfig.getInPhasesUptoAndIncludingPostDispatch().iterator();
+                                axisConfig.getGlobalInFlow().iterator();
 
                         while (itr_axis_config.hasNext()) {
                             Object o = itr_axis_config.next();
@@ -293,6 +190,110 @@
 
                     phaseHolder.addHandler(metadata);
                 }
+            }
+        }
+    }
+
+    /**
+     * To remove handlers from global chians this method can be used , first it take inflow
+     * of the module and then take handler one by one and then remove those handlers from
+     * global inchain ,
+     * the same procedure will be carry out for all the other flows as well.
+     *
+     * @param module
+     */
+    public void disEngageModulefromGlobalChains(AxisModule module) {
+        //INFLOW
+        Flow flow = module.getInFlow();
+        if (flow != null) {
+            for (int j = 0; j < flow.getHandlerCount(); j++) {
+                HandlerDescription handler = flow.getHandler(j);
+                removeHandlerfromaPhase(handler, axisConfig.getGlobalInFlow());
+            }
+        }
+        //OUTFLOW
+        flow = module.getOutFlow();
+        if (flow != null) {
+            for (int j = 0; j < flow.getHandlerCount(); j++) {
+                HandlerDescription handler = flow.getHandler(j);
+                removeHandlerfromaPhase(handler, axisConfig.getGlobalOutPhases());
+            }
+        }
+        //INFAULTFLOW
+        flow = module.getFaultInFlow();
+        if (flow != null) {
+            for (int j = 0; j < flow.getHandlerCount(); j++) {
+                HandlerDescription handler = flow.getHandler(j);
+                removeHandlerfromaPhase(handler, axisConfig.getInFaultFlow());
+            }
+        }
+        //OUTFAULTFLOW
+        flow = module.getFaultOutFlow();
+        if (flow != null) {
+            for (int j = 0; j < flow.getHandlerCount(); j++) {
+                HandlerDescription handler = flow.getHandler(j);
+                removeHandlerfromaPhase(handler, axisConfig.getOutFaultFlow());
+            }
+        }
+    }
+
+    /**
+     * To remove handlers from operations chians this method can be used , first it take inflow
+     * of the module and then take handler one by one and then remove those handlers from
+     * global inchain ,
+     * the same procedure will be carry out for all the other flows as well.
+     *
+     * @param module
+     */
+    public void disEngageModulefromOperationChian(AxisModule module, AxisOperation operation) {
+        //INFLOW
+        Flow flow = module.getInFlow();
+        if (flow != null) {
+            for (int j = 0; j < flow.getHandlerCount(); j++) {
+                HandlerDescription handler = flow.getHandler(j);
+                removeHandlerfromaPhase(handler, operation.getRemainingPhasesInFlow());
+            }
+        }
+        //OUTFLOW
+        flow = module.getOutFlow();
+        if (flow != null) {
+            for (int j = 0; j < flow.getHandlerCount(); j++) {
+                HandlerDescription handler = flow.getHandler(j);
+                removeHandlerfromaPhase(handler, operation.getPhasesOutFlow());
+            }
+        }
+        //INFAULTFLOW
+        flow = module.getFaultInFlow();
+        if (flow != null) {
+            for (int j = 0; j < flow.getHandlerCount(); j++) {
+                HandlerDescription handler = flow.getHandler(j);
+                removeHandlerfromaPhase(handler, operation.getPhasesInFaultFlow());
+            }
+        }
+        //OUTFAULTFLOW
+        flow = module.getFaultOutFlow();
+        if (flow != null) {
+            for (int j = 0; j < flow.getHandlerCount(); j++) {
+                HandlerDescription handler = flow.getHandler(j);
+                removeHandlerfromaPhase(handler, operation.getPhasesOutFaultFlow());
+            }
+        }
+    }
+
+    /**
+     * To remove a single handler from a given list of phases
+     *
+     * @param handler
+     * @param phaseList
+     */
+    private void removeHandlerfromaPhase(HandlerDescription handler, ArrayList phaseList) {
+        String phaseName = handler.getRules().getPhaseName();
+        Iterator phaseItr = phaseList.iterator();
+        while (phaseItr.hasNext()) {
+            Phase phase = (Phase) phaseItr.next();
+            if (phase.getPhaseName().equals(phaseName)) {
+                phase.removeHandler(handler);
+                break;
             }
         }
     }

Added: webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/META-INF/module.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/META-INF/module.xml?rev=383472&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/META-INF/module.xml (added)
+++ webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/META-INF/module.xml Sun Mar  5 21:30:18 2006
@@ -0,0 +1,23 @@
+<module>
+    <inflow>
+        <handler name="Hnadler1"
+                 class="org.apache.axis2.deployment.SpeakingHandler">
+            <order phase="PreDispatch"/>
+        </handler>
+        <handler name="Handler2"
+                 class="org.apache.axis2.deployment.SpeakingHandler">
+            <order phase="PreDispatch"/>
+        </handler>
+        <handler name="Handler3"
+                 class="org.apache.axis2.deployment.SpeakingHandler">
+            <order phase="userphase1"/>
+        </handler>
+    </inflow>
+
+    <outflow>
+        <handler name="Handler4"
+                 class="org.apache.axis2.deployment.SpeakingHandler">
+            <order phase="MessageOut"/>
+        </handler>
+    </outflow>
+</module>
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/ModuleDisEngagementTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/ModuleDisEngagementTest.java?rev=383472&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/ModuleDisEngagementTest.java (added)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/ModuleDisEngagementTest.java Sun Mar  5 21:30:18 2006
@@ -0,0 +1,201 @@
+package org.apache.axis2.deployment;
+
+import junit.framework.TestCase;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.description.AxisModule;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.InOutAxisOperation;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.engine.Phase;
+
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
+
+public class ModuleDisEngagementTest extends TestCase {
+    AxisConfiguration er;
+    String serviceName = "testService";
+    QName opName = new QName("testOperation");
+
+    protected void setUp() throws Exception {
+        String filename = "./test-resources/deployment/moduleDisEngegeRepo";
+        er = ConfigurationContextFactory.
+                createConfigurationContextFromFileSystem(filename, null).getAxisConfiguration();
+        AxisService testService = new AxisService();
+        testService.setName(serviceName);
+        AxisOperation testOperation = new InOutAxisOperation();
+        testOperation.setName(opName);
+        testService.addOperation(testOperation);
+        er.addService(testService);
+    }
+
+    public void testGloalDisengagement() throws AxisFault {
+        AxisModule module = er.getModule(new QName("testModule"));
+        assertNotNull(module);
+        Phase predisptah;
+        Phase userPhase;
+        ArrayList globalinflow = er.getGlobalInFlow();
+        assertNotNull(globalinflow);
+        predisptah = (Phase) globalinflow.get(1);
+        assertNotNull(predisptah);
+        assertEquals(predisptah.getHandlerCount(), 0);
+        AxisService service = er.getService(serviceName);
+        assertNotNull(service);
+        AxisOperation operation = service.getOperation(opName);
+        assertNotNull(operation);
+        userPhase = (Phase) operation.getRemainingPhasesInFlow().get(0);
+        assertNotNull(userPhase);
+        assertEquals(0, userPhase.getHandlerCount());
+        er.engageModule(module.getName());
+        assertEquals(predisptah.getHandlerCount(), 2);
+        assertEquals(1, userPhase.getHandlerCount());
+        er.disEngageModule(module);
+        assertEquals(predisptah.getHandlerCount(), 0);
+        assertEquals(0, userPhase.getHandlerCount());
+    }
+
+    public void testServiceDisengagement() throws AxisFault {
+        AxisModule module = er.getModule(new QName("testModule"));
+        assertNotNull(module);
+        Phase predisptah;
+        Phase userPhase;
+        ArrayList globalinflow = er.getGlobalInFlow();
+        assertNotNull(globalinflow);
+        predisptah = (Phase) globalinflow.get(1);
+        assertNotNull(predisptah);
+        assertEquals(predisptah.getHandlerCount(), 0);
+        AxisService service = er.getService(serviceName);
+        assertNotNull(service);
+        AxisOperation operation = service.getOperation(opName);
+        assertNotNull(operation);
+        userPhase = (Phase) operation.getRemainingPhasesInFlow().get(0);
+        assertNotNull(userPhase);
+        assertEquals(0, userPhase.getHandlerCount());
+        er.engageModule(module.getName());
+        assertEquals(predisptah.getHandlerCount(), 2);
+        assertEquals(1, userPhase.getHandlerCount());
+        service.disEngageModule(module);
+        assertEquals(predisptah.getHandlerCount(), 2);
+        assertEquals(0, userPhase.getHandlerCount());
+    }
+
+    public void testOperationDisengagement() throws AxisFault {
+        AxisModule module = er.getModule(new QName("testModule"));
+        assertNotNull(module);
+        Phase predisptah;
+        Phase userPhase;
+        ArrayList globalinflow = er.getGlobalInFlow();
+        assertNotNull(globalinflow);
+        predisptah = (Phase) globalinflow.get(1);
+        assertNotNull(predisptah);
+        assertEquals(predisptah.getHandlerCount(), 0);
+        AxisService service = er.getService(serviceName);
+        assertNotNull(service);
+        AxisOperation operation = service.getOperation(opName);
+        assertNotNull(operation);
+        userPhase = (Phase) operation.getRemainingPhasesInFlow().get(0);
+        assertNotNull(userPhase);
+        assertEquals(0, userPhase.getHandlerCount());
+        er.engageModule(module.getName());
+        assertEquals(predisptah.getHandlerCount(), 2);
+        assertEquals(1, userPhase.getHandlerCount());
+        operation.disEngageModule(module);
+        assertEquals(predisptah.getHandlerCount(), 2);
+        assertEquals(0, userPhase.getHandlerCount());
+    }
+
+    public void testServiceEnageServiceDisengag() throws AxisFault {
+        AxisModule module = er.getModule(new QName("testModule"));
+        assertNotNull(module);
+        Phase predisptah;
+        Phase userPhase;
+        ArrayList globalinflow = er.getGlobalInFlow();
+        assertNotNull(globalinflow);
+        predisptah = (Phase) globalinflow.get(1);
+        assertNotNull(predisptah);
+        assertEquals(predisptah.getHandlerCount(), 0);
+        AxisService service = er.getService(serviceName);
+        assertNotNull(service);
+        AxisOperation operation = service.getOperation(opName);
+        assertNotNull(operation);
+        userPhase = (Phase) operation.getRemainingPhasesInFlow().get(0);
+        assertNotNull(userPhase);
+        assertEquals(0, userPhase.getHandlerCount());
+        service.engageModule(module, er);
+        assertEquals(predisptah.getHandlerCount(), 2);
+        assertEquals(1, userPhase.getHandlerCount());
+        service.disEngageModule(module);
+        assertEquals(predisptah.getHandlerCount(), 0);
+        assertEquals(0, userPhase.getHandlerCount());
+    }
+
+     public void testServiceEnageOperationDisengag() throws AxisFault {
+        AxisModule module = er.getModule(new QName("testModule"));
+        assertNotNull(module);
+        Phase predisptah;
+        Phase userPhase;
+        ArrayList globalinflow = er.getGlobalInFlow();
+        assertNotNull(globalinflow);
+        predisptah = (Phase) globalinflow.get(1);
+        assertNotNull(predisptah);
+        assertEquals(predisptah.getHandlerCount(), 0);
+        AxisService service = er.getService(serviceName);
+        assertNotNull(service);
+        AxisOperation operation = service.getOperation(opName);
+        assertNotNull(operation);
+        userPhase = (Phase) operation.getRemainingPhasesInFlow().get(0);
+        assertNotNull(userPhase);
+        assertEquals(0, userPhase.getHandlerCount());
+        service.engageModule(module, er);
+        assertEquals(predisptah.getHandlerCount(), 2);
+        assertEquals(1, userPhase.getHandlerCount());
+        operation.disEngageModule(module);
+        assertEquals(predisptah.getHandlerCount(), 2);
+        assertEquals(0, userPhase.getHandlerCount());
+    }
+
+    public void testOperationEnageOperationDisengage() throws AxisFault {
+        AxisModule module = er.getModule(new QName("testModule"));
+        assertNotNull(module);
+        Phase predisptah;
+        Phase userPhase;
+        ArrayList globalinflow = er.getGlobalInFlow();
+        assertNotNull(globalinflow);
+        predisptah = (Phase) globalinflow.get(1);
+        assertNotNull(predisptah);
+        assertEquals(predisptah.getHandlerCount(), 0);
+        AxisService service = er.getService(serviceName);
+        assertNotNull(service);
+        AxisOperation operation = service.getOperation(opName);
+        assertNotNull(operation);
+        userPhase = (Phase) operation.getRemainingPhasesInFlow().get(0);
+        assertNotNull(userPhase);
+        assertEquals(0, userPhase.getHandlerCount());
+        operation.engageModule(module, er);
+        assertEquals(predisptah.getHandlerCount(), 2);
+        assertEquals(1, userPhase.getHandlerCount());
+        operation.disEngageModule(module);
+        assertEquals(predisptah.getHandlerCount(), 0);
+        assertEquals(0, userPhase.getHandlerCount());
+    }
+
+
+}

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java Sun Mar  5 21:30:18 2006
@@ -91,7 +91,7 @@
         dispatchPhase.addHandler(sabd);
         dispatchPhase.addHandler(smbd);
         dispatchPhase.addHandler(id);
-        configConetxt.getAxisConfiguration().getInPhasesUptoAndIncludingPostDispatch().add(dispatchPhase);
+        configConetxt.getAxisConfiguration().getGlobalInFlow().add(dispatchPhase);
         AxisOperation axisOp = new InOutAxisOperation(operationName);
         axisOp.setMessageReceiver(new MessageReceiver() {
             public void receive(MessageContext messageCtx) {

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/InvalidPhaseRuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/InvalidPhaseRuleTest.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/InvalidPhaseRuleTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/InvalidPhaseRuleTest.java Sun Mar  5 21:30:18 2006
@@ -43,7 +43,7 @@
             super.setUp();
             phaserul = new InvalidPhaseRuleTest("");
             axisSytem = new AxisConfiguration();
-            ArrayList inPhase = axisSytem.getInPhasesUptoAndIncludingPostDispatch();
+            ArrayList inPhase = axisSytem.getGlobalInFlow();
 
             Handler han = null;
             PhaseHolder ph = new PhaseHolder(inPhase);
@@ -90,7 +90,7 @@
 
             phaserul = new InvalidPhaseRuleTest("");
             axisSytem = new AxisConfiguration();
-            ArrayList inPhase = axisSytem.getInPhasesUptoAndIncludingPostDispatch();
+            ArrayList inPhase = axisSytem.getGlobalInFlow();
 
             inPhase.add("global");
             ((AxisConfiguration) axisSytem).setInFaultPhases(inPhase);

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PhaseRuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PhaseRuleTest.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PhaseRuleTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PhaseRuleTest.java Sun Mar  5 21:30:18 2006
@@ -27,7 +27,7 @@
         //TODO fix me
         phaserul = new PhaseRuleTest("");
         axisSytem = new AxisConfiguration();
-        ArrayList inPhase = axisSytem.getInPhasesUptoAndIncludingPostDispatch();
+        ArrayList inPhase = axisSytem.getGlobalInFlow();
         Phase transportIN = new Phase("TransportIn");
         Phase preDispatch = new Phase("PreDispatch");
         DispatchPhase dispatchPhase = new DispatchPhase();

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PreDispatchPhaseRuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PreDispatchPhaseRuleTest.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PreDispatchPhaseRuleTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/phaserule/PreDispatchPhaseRuleTest.java Sun Mar  5 21:30:18 2006
@@ -41,7 +41,7 @@
         //TODO Fix me
         phaserul = new PreDispatchPhaseRuleTest("");
         axisSytem = new AxisConfiguration();
-        ArrayList inPhase = axisSytem.getInPhasesUptoAndIncludingPostDispatch();
+        ArrayList inPhase = axisSytem.getGlobalInFlow();
         Phase transportIN = new Phase("TransportIn");
         Phase preDispatch = new Phase("PreDispatch");
         DispatchPhase dispatchPhase = new DispatchPhase();

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/FaultHandlingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/FaultHandlingTest.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/FaultHandlingTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/FaultHandlingTest.java Sun Mar  5 21:30:18 2006
@@ -55,7 +55,7 @@
 
     public void testFaultHandling() throws AxisFault {
         ConfigurationContext configurationContext = UtilServer.getConfigurationContext();
-        ArrayList inPhasesUptoAndIncludingPostDispatch = configurationContext.getAxisConfiguration().getInPhasesUptoAndIncludingPostDispatch();
+        ArrayList inPhasesUptoAndIncludingPostDispatch = configurationContext.getAxisConfiguration().getGlobalInFlow();
         Phase phaseOne = (Phase) inPhasesUptoAndIncludingPostDispatch.get(0);
         phaseOne.addHandler(new FaultHandler());
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java Sun Mar  5 21:30:18 2006
@@ -84,7 +84,7 @@
         dispatchPhase.addHandler(sabd);
         dispatchPhase.addHandler(smbd);
         dispatchPhase.addHandler(id);
-        config.getInPhasesUptoAndIncludingPostDispatch().add(dispatchPhase);
+        config.getGlobalInFlow().add(dispatchPhase);
         TransportInDescription tIn = new TransportInDescription(new QName(Constants.TRANSPORT_LOCAL));
         config.addTransportIn(tIn);
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java?rev=383472&r1=383471&r2=383472&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java Sun Mar  5 21:30:18 2006
@@ -94,7 +94,7 @@
         dispatchPhase.addHandler(sabd);
         dispatchPhase.addHandler(smbd);
         dispatchPhase.addHandler(id);
-        config.getInPhasesUptoAndIncludingPostDispatch().add(dispatchPhase);
+        config.getGlobalInFlow().add(dispatchPhase);
         service.engageModule(m1, config);
 
         AxisOperation axisOperation = new OutInAxisOperation(