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 pa...@apache.org on 2009/07/10 16:59:52 UTC

svn commit: r792965 - /webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java

Author: parsonsd
Date: Fri Jul 10 14:59:52 2009
New Revision: 792965

URL: http://svn.apache.org/viewvc?rev=792965&view=rev
Log:
- When an inorder RM system is under load msgs aren't always being delivered to applications as the InvokerWorker currently working the seq has the lock on the seq but has decided that there are no more msgs to process as the SequenceProcessor thread hasn't quite got as far as inserting a new InvokerBean.  This means neither thread does the work of delivering the msg to the application.  The fix is to move the removing of the lock on the sequence to before we commit the tran used to find the InvokerBean in the InvokerWorker.

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

Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java?rev=792965&r1=792964&r2=792965&view=diff
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java Fri Jul 10 14:59:52 2009
@@ -159,22 +159,24 @@
 						}
 					}
 				}
+
+				if(nextBean == null || nextWorker != null) {
+					//Remove the lock before we unlock the invokerBean
+					lock.removeWork(workId);
+
+					// Clean up the tran, in case we didn't pass it into the invoke method
+					if(tran != null) tran.commit();
+					tran = null;
+
+					break;
+				}
 		
 				// Clean up the tran, in case we didn't pass it into the invoke method
 				if(tran != null) tran.commit();
 				tran = null;
-						
-				if(nextBean == null || nextWorker != null) {
-					// We have run out of work, or the new worker has taken it on, so we can
-					// break out of the loop
-					break;
-				}
+		
 			}//end while
 					
-			if (workId !=null && lock!=null) {
-				lock.removeWork(workId);
-			}
-
 			// If we created another worker, set it running now that we have released the lock
 			if(nextWorker != null) {
 				lock.addWork(workId, nextWorker);



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