Author: chamikara
Date: Mon Feb 13 23:38:58 2006
New Revision: 377663
URL: http://svn.apache.org/viewcvs?rev=377663&view=rev
Log:
Added a single transaction for both invocation and post invocation updates.
This support transaction based invocation. I.e. if this transaction does not
complete, message will be re-invoked.
Modified:
webservices/sandesha/trunk/src/org/apache/sandesha2/SandeshaModule.java
webservices/sandesha/trunk/src/org/apache/sandesha2/workers/InOrderInvoker.java
Modified:
webservices/sandesha/trunk/src/org/apache/sandesha2/SandeshaModule.java
URL:
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/SandeshaModule.java?rev=377663&r1=377662&r2=377663&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/SandeshaModule.java
(original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/SandeshaModule.java Mon
Feb 13 23:38:58 2006
@@ -25,6 +25,7 @@
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.description.ParameterImpl;
+import org.apache.axis2.description.PolicyInclude;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.modules.Module;
import org.apache.sandesha2.storage.StorageManager;
@@ -41,7 +42,7 @@
*/
public class SandeshaModule implements Module {
-
+
// initialize the module
public void init(ConfigurationContext configContext,
AxisModule module) throws AxisFault {
Modified:
webservices/sandesha/trunk/src/org/apache/sandesha2/workers/InOrderInvoker.java
URL:
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/workers/InOrderInvoker.java?rev=377663&r1=377662&r2=377663&view=diff
==============================================================================
---
webservices/sandesha/trunk/src/org/apache/sandesha2/workers/InOrderInvoker.java
(original)
+++
webservices/sandesha/trunk/src/org/apache/sandesha2/workers/InOrderInvoker.java
Mon Feb 13 23:38:58 2006
@@ -162,15 +162,19 @@
sequenceInvocationTransaction.commit();
+
+ Transaction invocationTransaction =
storageManager.getTransaction(); //Transaction based invocation
+
+
while (stMapIt.hasNext()) {
InvokerBean stMapBean =
(InvokerBean) stMapIt
.next();
String key =
stMapBean.getMessageContextRefKey();
- Transaction
invocationTransaction = storageManager.getTransaction();
+
MessageContext msgToInvoke =
storageManager.retrieveMessageContext(key,context);
- invocationTransaction.commit();
+
//invocationTransaction.commit();
RMMsgContext rmMsg =
MsgInitializer
.initializeMessage(msgToInvoke);
@@ -199,7 +203,7 @@
throw new
SandeshaException(e);
}
- Transaction
postInvocationTransaction = storageManager.getTransaction();
+ //Transaction
postInvocationTransaction = storageManager.getTransaction();
//undating the next msg to
invoke
nextMsgno++;
stMapIt = storageMapMgr
@@ -222,13 +226,16 @@
break
currentIteration;
}
}
-
postInvocationTransaction.commit();
+
+
}
- Transaction updateNextMsgTransaction =
storageManager.getTransaction();
+ //Transaction updateNextMsgTransaction
= storageManager.getTransaction();
nextMsgBean.setNextMsgNoToProcess(nextMsgno);
nextMsgMgr.update(nextMsgBean);
- updateNextMsgTransaction.commit();
+ //updateNextMsgTransaction.commit();
+
+ invocationTransaction.commit();
}
} catch (SandeshaException e1) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]