ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sume...@apache.org
Subject svn commit: r575615 - /webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java
Date Fri, 14 Sep 2007 10:54:24 GMT
Author: sumedha
Date: Fri Sep 14 03:54:15 2007
New Revision: 575615

URL: http://svn.apache.org/viewvc?rev=575615&view=rev
Log:
copying r575314 from trunk

Modified:
    webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java

Modified: webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java?rev=575615&r1=575614&r2=575615&view=diff
==============================================================================
--- webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java
(original)
+++ webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java
Fri Sep 14 03:54:15 2007
@@ -56,6 +56,13 @@
 			InvokerBean invokerBean = invokerBeanMgr.retrieve(messageContextKey);
 
 			msgToInvoke = storageManager.retrieveMessageContext(messageContextKey, configurationContext);
+
+			// ending the transaction before invocation.
+			if(transaction != null) {
+				transaction.commit();
+				transaction = storageManager.getTransaction();
+			}
+			
 			RMMsgContext rmMsg = MsgInitializer.initializeMessage(msgToInvoke);
 
 			// Lock the RMD Bean just to avoid deadlocks
@@ -66,12 +73,6 @@
 			// removing the corresponding message context as well.
 			storageManager.removeMessageContext(messageContextKey);
 
-			// ending the transaction before invocation.
-			if(transaction != null) {
-				transaction.commit();
-				transaction = null;
-			}
-			
 			try {
 
 				boolean postFailureInvocation = false;
@@ -98,12 +99,18 @@
 					msgToInvoke.setPaused(false);
 					AxisEngine.resumeReceive(msgToInvoke);
 				}
-
+				
+				if (transaction != null && transaction.isActive()){
+					transaction.commit();
+				}
 			} catch (Exception e) {
 				if (log.isDebugEnabled())
 					log.debug("Exception :", e);
-
-				handleFault(rmMsg, e);
+				
+			    if (transaction != null && transaction.isActive()){
+			        transaction.rollback();			    	
+			    }
+			    handleFault(rmMsg, e);
 			}
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org


Mime
View raw message