You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by am...@apache.org on 2008/12/08 05:29:29 UTC

svn commit: r724249 - /webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java

Author: amilas
Date: Sun Dec  7 20:29:28 2008
New Revision: 724249

URL: http://svn.apache.org/viewvc?rev=724249&view=rev
Log:
applied the patch for SANDESHA-184

Modified:
    webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java?rev=724249&r1=724248&r2=724249&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java Sun Dec  7 20:29:28 2008
@@ -304,6 +304,11 @@
 		
 		if(continueSending){
 
+			// Commit the current transaction, so that the SenderWorker can do it's own locking
+			// this transaction should be commited out before gettting the worker lock.
+			// otherwise a dead lock can happen.
+			if(transaction != null && transaction.isActive()) transaction.commit();
+			
 			SandeshaThread sender = storageManager.getSender();
 			WorkerLock lock = sender.getWorkerLock();
 
@@ -335,9 +340,7 @@
 			returnMessage.setProperty(Sandesha2Constants.MAKE_CONNECTION_RESPONSE, Boolean.TRUE);
 			returnMessage.setProperty(RequestResponseTransport.TRANSPORT_CONTROL, pollMessage.getProperty(RequestResponseTransport.TRANSPORT_CONTROL));
 			
-			// Commit the current transaction, so that the SenderWorker can do it's own locking
-			if(transaction != null && transaction.isActive()) transaction.commit();
-			
+
 			//running the MakeConnection through a SenderWorker.
 			//This will allow Sandesha2 to consider both of following senarios equally.
 			//  1. A message being sent by the Sender thread.



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