Author: mszefler
Date: Mon Aug  6 13:47:50 2007
New Revision: 563266

URL: http://svn.apache.org/viewvc?view=rev&rev=563266
Log:
BART, some additinal refactorings. New model to fix concurrency problems in 
Partner invokes.

Modified:
    
ode/branches/bart/axis2/src/main/java/org/apache/ode/axis2/MessageExchangeContextImpl.java
    ode/branches/bart/axis2/src/main/java/org/apache/ode/axis2/ODEService.java

Modified: 
ode/branches/bart/axis2/src/main/java/org/apache/ode/axis2/MessageExchangeContextImpl.java
URL: 
http://svn.apache.org/viewvc/ode/branches/bart/axis2/src/main/java/org/apache/ode/axis2/MessageExchangeContextImpl.java?view=diff&rev=563266&r1=563265&r2=563266
==============================================================================
--- 
ode/branches/bart/axis2/src/main/java/org/apache/ode/axis2/MessageExchangeContextImpl.java
 (original)
+++ 
ode/branches/bart/axis2/src/main/java/org/apache/ode/axis2/MessageExchangeContextImpl.java
 Mon Aug  6 13:47:50 2007
@@ -48,8 +48,7 @@
     
     static {
         HashSet<InvocationStyle> styles = new HashSet<InvocationStyle>();
-        styles.add(InvocationStyle.ASYNC);
-        styles.add(InvocationStyle.BLOCKING);
+        styles.add(InvocationStyle.UNRELIABLE);
         __supportedInvocationStyles = Collections.unmodifiableSet(styles);
     }
     
@@ -73,27 +72,20 @@
     }
 
     public void invokePartnerReliable(PartnerRoleMessageExchange mex) throws 
ContextException {
+        // TODO: tie in to WS-RELIABLE* stack. 
         throw new UnsupportedOperationException();
     }
 
     public void invokePartnerTransacted(PartnerRoleMessageExchange mex) throws 
ContextException {
-        throw new UnsupportedOperationException();        
+        // TODO: should we check if the partner actually supports transactions?
+        invokePartnerBlocking(mex);
     }
 
     
 
-    public void onAsyncReply(MyRoleMessageExchange myRoleMessageExchange) 
throws BpelEngineException {
-        if (__log.isDebugEnabled())
-            __log.debug("Processing an async reply from service " + 
myRoleMessageExchange.getServiceName());
-
-        // Nothing to do, no callback is necessary, the client just 
synchornizes itself with the
-        // mex reply when invoking the engine.
-    }
-
-    public void onReliableReply(MyRoleMessageExchange myRoleMex) throws 
BpelEngineException {
-        __log.error("RELIABLE reply from service " + 
myRoleMex.getServiceName() +"; RELIABLE IS NOT SUPPORTED!");
-
-        // We don't support this yet, so not much to do here. 
+    public void onMyRoleMessageExchangeStateChanged(MyRoleMessageExchange 
myRoleMessageExchange) throws BpelEngineException {
+        // TODO: add code here to handle MEXs that we've "forgotten" about due 
to system failure etc.. mostly
+        // useful for RELIABLE, but nice to have with ASYNC/BLOCKING as well. 
     }
 
 

Modified: 
ode/branches/bart/axis2/src/main/java/org/apache/ode/axis2/ODEService.java
URL: 
http://svn.apache.org/viewvc/ode/branches/bart/axis2/src/main/java/org/apache/ode/axis2/ODEService.java?view=diff&rev=563266&r1=563265&r2=563266
==============================================================================
--- ode/branches/bart/axis2/src/main/java/org/apache/ode/axis2/ODEService.java 
(original)
+++ ode/branches/bart/axis2/src/main/java/org/apache/ode/axis2/ODEService.java 
Mon Aug  6 13:47:50 2007
@@ -86,7 +86,7 @@
         try {
             // Creating mesage exchange
             String messageId = new GUID().toString();
-            odeMex = _server.createMessageExchange(InvocationStyle.BLOCKING, 
_serviceName,
+            odeMex = _server.createMessageExchange(InvocationStyle.UNRELIABLE, 
_serviceName,
                     msgContext.getAxisOperation().getName().getLocalPart(), "" 
+ messageId);
             
             __log.debug("ODE routed to operation " + odeMex.getOperation() + " 
from service " + _serviceName);
@@ -152,14 +152,14 @@
     }
 
     private void onResponse(MyRoleMessageExchange mex, MessageContext 
msgContext) throws AxisFault {
-        switch (mex.getStatus()) {
+        switch (mex.getAckType()) {
             case FAULT:
                 if (__log.isDebugEnabled())
                     __log.debug("Fault response message: " + mex.getFault());
                 OMElement detail = 
_converter.createSoapFault(mex.getFaultResponse().getMessage(), mex.getFault(), 
mex.getOperation());
                 String reason = mex.getFault()+" "+mex.getFaultExplanation();
                 throw new AxisFault(mex.getFault(), reason, null, null, 
detail);
-            case ASYNC:
+            case ONEWAY:
             case RESPONSE:
                 _converter.createSoapResponse(msgContext, 
mex.getResponse().getMessage(), mex.getOperation());
                 if (__log.isDebugEnabled())


Reply via email to