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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to