You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2013/07/24 15:10:47 UTC

svn commit: r1506540 - /uima/sandbox/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java

Author: cwiklik
Date: Wed Jul 24 13:10:47 2013
New Revision: 1506540

URL: http://svn.apache.org/r1506540
Log:
UIMA-3107 move assignment of value to lifecycleController into the synchronized {..} block

Modified:
    uima/sandbox/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java?rev=1506540&r1=1506539&r2=1506540&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/event/AgentEventListener.java Wed Jul 24 13:10:47 2013
@@ -87,11 +87,7 @@ public class AgentEventListener implemen
 	 * @throws Exception
 	 */
 	public void onDuccJobsStateEvent(@Body DuccJobsStateEvent duccEvent) throws Exception {
-		//  typically lifecycleController is null and the agent assumes the role. For jUnit testing though, 
-	  //  a different lifecycleController is injected to facilitate black box testing
-	  if ( lifecycleController == null ) {
-			lifecycleController = agent;
-		}
+
 	  // Recv'd ducc state update, restart process reaper task which detects missing
 	  // OR state due to a network problem. 
 //	  try {
@@ -103,6 +99,11 @@ public class AgentEventListener implemen
 		try {
 
 		  synchronized( this ) {
+				//  typically lifecycleController is null and the agent assumes the role. For jUnit testing though, 
+			  //  a different lifecycleController is injected to facilitate black box testing
+			  if ( lifecycleController == null ) {
+					lifecycleController = agent;
+			  }
 			  //  print JP report targeted for this node
 			  reportIncomingStateForThisNode(duccEvent);