axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r169752 - in /webservices/axis/trunk/java/modules/core/src/org/apache/axis: context/MessageContext.java description/AxisOperation.java description/AxisService.java engine/AxisEngine.java engine/AxisSystem.java engine/AxisSystemImpl.java engine/RequestURIBasedDispatcher.java phaseresolver/PhaseHolder.java util/Utils.java
Date Thu, 12 May 2005 03:14:01 GMT
Author: hemapani
Date: Wed May 11 20:14:00 2005
New Revision: 169752

URL: http://svn.apache.org/viewcvs?rev=169752&view=rev
Log:
refactoring the engine

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisService.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystem.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/util/Utils.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java?rev=169752&r1=169751&r2=169752&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
Wed May 11 20:14:00 2005
@@ -454,7 +454,7 @@
         this.serviceInstanceID = serviceInstanceID;
     }
 
-    public SystemContext getEngineContext() {
+    public SystemContext getSystemContext() {
         return engineContext;
     }
 

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java?rev=169752&r1=169751&r2=169752&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
Wed May 11 20:14:00 2005
@@ -25,7 +25,11 @@
 		WSDLConstants {
 
 	private MessageReceiver messageReceiver;
-
+    private ArrayList remainingPhasesInInFlow;
+    private ArrayList phasesInOutFlow;
+    private ArrayList phasesInFaultInFlow;
+    private ArrayList phasesInFaultOutFlow;
+    
 	private int mep = MEP_CONSTANT_INVALID;
 
 	public AxisOperation() {
@@ -128,7 +132,7 @@
 		} else {
 			// So this message is part of an ongoing MEP
 			//			operationContext =
-			msgContext.getEngineContext().getOperationContext(
+			msgContext.getSystemContext().getOperationContext(
 					msgContext.getRelatesTo().getValue());
 
 			if (null == operationContext) {
@@ -141,7 +145,7 @@
 
 		}
 
-		msgContext.getEngineContext().registerOperationContext(
+		msgContext.getSystemContext().registerOperationContext(
 				msgContext.getMessageID(), operationContext);
 		operationContext.addMessageContext(msgContext);
 		msgContext.setOperationContext(operationContext);
@@ -228,5 +232,64 @@
 		return this.mep;
 
 	}
+    
+    
+    
+    /**
+     * @return
+     */
+    public ArrayList getPhasesInFaultInFlow() {
+        return phasesInFaultInFlow;
+    }
+
+    /**
+     * @return
+     */
+    public ArrayList getPhasesInFaultOutFlow() {
+        return phasesInFaultOutFlow;
+    }
+
+    /**
+     * @return
+     */
+    public ArrayList getPhasesInOutFlow() {
+        return phasesInOutFlow;
+    }
+
+    /**
+     * @return
+     */
+    public ArrayList getRemainingPhasesInInFlow() {
+        return remainingPhasesInInFlow;
+    }
+
+    /**
+     * @param list
+     */
+    public void setPhasesInFaultInFlow(ArrayList list) {
+        phasesInFaultInFlow = list;
+    }
+
+    /**
+     * @param list
+     */
+    public void setPhasesInFaultOutFlow(ArrayList list) {
+        phasesInFaultOutFlow = list;
+    }
+
+    /**
+     * @param list
+     */
+    public void setPhasesInOutFlow(ArrayList list) {
+        phasesInOutFlow = list;
+    }
+
+    /**
+     * @param list
+     */
+    public void setRemainingPhasesInInFlow(ArrayList list) {
+        remainingPhasesInInFlow = list;
+    }
+
 }
 

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisService.java?rev=169752&r1=169751&r2=169752&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisService.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisService.java
Wed May 11 20:14:00 2005
@@ -393,13 +393,13 @@
     public ServiceContext findServiceContext(MessageContext msgContext) {
         ServiceContext serviceContext = null;
         if (null == msgContext.getServiceInstanceID()) {
-            serviceContext = new ServiceContext(this, msgContext.getEngineContext());
+            serviceContext = new ServiceContext(this, msgContext.getSystemContext());
             //TODO Once the ServiceContext is bound to an incomming serviceContext ID(like
a cookie,reference Property) FIX this
             //			msgContext.getEngineContext().registerServiceContext(serviceContext.getServiceInstanceID(),
             // serviceContext);
         } else {
             serviceContext =
-                (ServiceContext) msgContext.getEngineContext().getServiceContext(
+                (ServiceContext) msgContext.getSystemContext().getServiceContext(
                     msgContext.getServiceInstanceID());
         }
 

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java?rev=169752&r1=169751&r2=169752&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java Wed
May 11 20:14:00 2005
@@ -238,6 +238,22 @@
             log.error("Error in fault flow", e);
         }
     }
+    
+    
+    private void verifyContextBuilt(MessageContext msgctx) throws AxisFault{
+        if(msgctx.getSystemContext() == null){
+            throw new AxisFault("OperationContext can not be null");
+        }
+        if(msgctx.getOperationContext() == null){
+            throw new AxisFault("OperationContext can not be null");
+        }
+        if(msgctx.getServiceContext() == null){
+            throw new AxisFault("ServiceContext can not be null");
+        }
+
+        
+    }
+    
 
     /* --------------------------------------------------------------------------------------------*/
     /* -----------------   Methods related to storage ----------------------------------------------*/

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystem.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystem.java?rev=169752&r1=169751&r2=169752&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystem.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystem.java Wed
May 11 20:14:00 2005
@@ -110,11 +110,12 @@
      */
     public HashMap getTransports() throws AxisFault;
 
+    /**
+     *  This returns 
+     */
+    public ArrayList getInPhasesUptoAndIncludingPostDispatch();
+  
 
-    public ArrayList getInPhases();
-    public ArrayList getOutPhases();
-    public ArrayList getInFaultPhases() ;
-    public ArrayList getOutFaultPhases();
     
     /**
      * Method getServices
@@ -133,5 +134,6 @@
     public HashMap getTransportsIn();
     public HashMap getTransportsOut();
 
-    ArrayList getFaultPhases();
+    
+    
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java?rev=169752&r1=169751&r2=169752&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisSystemImpl.java
Wed May 11 20:14:00 2005
@@ -228,11 +228,11 @@
     }
 
    
-    public ArrayList getInPhases() {
+    public ArrayList getInPhasesUptoAndIncludingPostDispatch() {
         return inPhases;
     }
 
-    public ArrayList getOutPhases() {
+    public ArrayList getOutFlow() {
         return outPhases;
     }
 
@@ -241,14 +241,14 @@
     /**
      * @return
      */
-    public ArrayList getInFaultPhases() {
+    public ArrayList getInFaultFlow() {
         return inFaultPhases;
     }
 
     /**
      * @return
      */
-    public ArrayList getOutFaultPhases() {
+    public ArrayList getOutFaultFlow() {
         return outFaultPhases;
     }
 

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java?rev=169752&r1=169751&r2=169752&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/RequestURIBasedDispatcher.java
Wed May 11 20:14:00 2005
@@ -68,7 +68,7 @@
             if (index > 0) {
                 serviceStr = filePart.substring(index + URI_ID_STRING.length() + 1);
 
-                SystemContext engineContext = messageContext.getEngineContext();
+                SystemContext engineContext = messageContext.getSystemContext();
 
                 if ((index = serviceStr.indexOf('/')) > 0) {
                     serviceName = new QName(serviceStr.substring(0, index));
@@ -77,7 +77,7 @@
                     serviceName = new QName(serviceStr);
                 }
 
-                AxisSystem registry = messageContext.getEngineContext().getEngineConfig();
+                AxisSystem registry = messageContext.getSystemContext().getEngineConfig();
                 return registry.getService(serviceName);
             }
         }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java?rev=169752&r1=169751&r2=169752&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseHolder.java
Wed May 11 20:14:00 2005
@@ -97,36 +97,36 @@
         outPhases = new ArrayList();
         faultInPhases = new ArrayList();
         faultOutPhases = new ArrayList();
-
-        ArrayList tempPhases = registry.getInPhases();
-        for (int i = 0; i < tempPhases.size(); i++) {
-            String name = (String) tempPhases.get(i);
-            PhaseMetadata pm = new PhaseMetadata(name);
-            inPhases.add(pm);
-        }
-        inPhases.add(0, new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
-        tempPhases = registry.getOutPhases();
-        for (int i = 0; i < tempPhases.size(); i++) {
-            String name = (String) tempPhases.get(i);
-            PhaseMetadata pm = new PhaseMetadata(name);
-            outPhases.add(pm);
-        }
-        outPhases.add(new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
-
-        tempPhases = registry.getInFaultPhases();
-        faultInPhases.add(0, new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
-        for (int i = 0; i < tempPhases.size(); i++) {
-            String name = (String) tempPhases.get(i);
-            PhaseMetadata pm = new PhaseMetadata(name);
-            faultInPhases.add(pm);
-        }
-        tempPhases = registry.getOutFaultPhases();
-        for (int i = 0; i < tempPhases.size(); i++) {
-            String name = (String) tempPhases.get(i);
-            PhaseMetadata pm = new PhaseMetadata(name);
-            faultOutPhases.add(pm);
-        }
-        faultOutPhases.add(new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
+//TODO deepal fix this
+//        ArrayList tempPhases = registry.getInPhasesUptoAndIncludingPostDispatch();
+//        for (int i = 0; i < tempPhases.size(); i++) {
+//            String name = (String) tempPhases.get(i);
+//            PhaseMetadata pm = new PhaseMetadata(name);
+//            inPhases.add(pm);
+//        }
+//        inPhases.add(0, new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
+//        tempPhases = registry.getOutFlow();
+//        for (int i = 0; i < tempPhases.size(); i++) {
+//            String name = (String) tempPhases.get(i);
+//            PhaseMetadata pm = new PhaseMetadata(name);
+//            outPhases.add(pm);
+//        }
+//        outPhases.add(new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
+//
+//        tempPhases = registry.getInFaultFlow();
+//        faultInPhases.add(0, new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
+//        for (int i = 0; i < tempPhases.size(); i++) {
+//            String name = (String) tempPhases.get(i);
+//            PhaseMetadata pm = new PhaseMetadata(name);
+//            faultInPhases.add(pm);
+//        }
+//        tempPhases = registry.getOutFaultFlow();
+//        for (int i = 0; i < tempPhases.size(); i++) {
+//            String name = (String) tempPhases.get(i);
+//            PhaseMetadata pm = new PhaseMetadata(name);
+//            faultOutPhases.add(pm);
+//        }
+//        faultOutPhases.add(new PhaseMetadata(PhaseMetadata.PRE_DISPATCH));
     }
 
     /**

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/util/Utils.java?rev=169752&r1=169751&r2=169752&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/util/Utils.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/util/Utils.java Wed May 11
20:14:00 2005
@@ -127,7 +127,7 @@
                 oldMessageContext.getSessionContext(),
                 oldMessageContext.getTransportIn(),
                 oldMessageContext.getTransportOut(),
-                oldMessageContext.getEngineContext());
+                oldMessageContext.getSystemContext());
 
         messageContext.setMessageInformationHeaders(new MessageInformationHeadersCollection());
         MessageInformationHeadersCollection oldMessageInfoHeaders =



Mime
View raw message