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 na...@apache.org on 2006/10/29 04:10:31 UTC
svn commit: r468825 - in
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2:
context/MessageContext.java engine/AxisEngine.java
Author: nagy
Date: Sat Oct 28 20:10:30 2006
New Revision: 468825
URL: http://svn.apache.org/viewvc?view=rev&rev=468825
Log:
Fixed problem with a phase with a handler that persists a message and pauses the flow not being saved to be invoked for a flowComplete.
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java?view=diff&rev=468825&r1=468824&r2=468825
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java Sat Oct 28 20:10:30 2006
@@ -264,6 +264,18 @@
}
/**
+ * Remove the first Phase in the collection of executed phases for the
+ * inbound path.
+ */
+ public void removeFirstInboundExecutedPhase()
+ {
+ if (inboundExecutedPhases != null)
+ {
+ inboundExecutedPhases.removeFirst();
+ }
+ }
+
+ /**
* Get an iterator over the inbound executed phase list.
* @return An Iterator over the LIFO data structure.
*/
@@ -291,6 +303,18 @@
public void addOutboundExecutedPhase(Handler phase)
{
outboundExecutedPhases.addFirst(phase);
+ }
+
+ /**
+ * Remove the first Phase in the collection of executed phases for the
+ * outbound path.
+ */
+ public void removeFirstOutboundExecutedPhase()
+ {
+ if (outboundExecutedPhases != null)
+ {
+ outboundExecutedPhases.removeFirst();
+ }
}
/**
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java?view=diff&rev=468825&r1=468824&r2=468825
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java Sat Oct 28 20:10:30 2006
@@ -550,11 +550,29 @@
try
{
+ if (!resuming)
+ {
+ if (inbound)
+ {
+ msgContext.addInboundExecutedPhase(currentHandler);
+ }
+ else
+ {
+ msgContext.addOutboundExecutedPhase(currentHandler);
+ }
+ }
+ else
+ {
+ /* If we are resuming the flow, we don't want to add the phase
+ * again, as it has already been added.
+ */
+ resuming = false;
+ }
pi = currentHandler.invoke(msgContext);
}
catch (AxisFault e)
{
- if (msgContext.getCurrentPhaseIndex() != 0)
+ if (msgContext.getCurrentPhaseIndex() == 0)
{
/* If we got a fault, we still want to add the phase to the
list to be executed for flowComplete(...) unless this was
@@ -566,32 +584,14 @@
executed.*/
if (inbound)
{
- msgContext.addInboundExecutedPhase(currentHandler);
+ msgContext.removeFirstInboundExecutedPhase();
}
else
{
- msgContext.addOutboundExecutedPhase(currentHandler);
+ msgContext.removeFirstOutboundExecutedPhase();
}
}
throw e;
- }
-
- if (resuming)
- {
- /*If we are resuming the flow, we don't want to add the phase again, as it has already
- *been added.*/
- resuming = false;
- }
- else
- {
- if (inbound)
- {
- msgContext.addInboundExecutedPhase(currentHandler);
- }
- else
- {
- msgContext.addOutboundExecutedPhase(currentHandler);
- }
}
if (pi.equals(InvocationResponse.SUSPEND) ||
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org