You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by pe...@apache.org on 2010/05/05 09:35:53 UTC

svn commit: r941185 - /incubator/river/jtsk/trunk/src/com/sun/jini/norm/NormServerBaseImpl.java

Author: peter_firmstone
Date: Wed May  5 07:35:52 2010
New Revision: 941185

URL: http://svn.apache.org/viewvc?rev=941185&view=rev
Log:
River-287

Modified:
    incubator/river/jtsk/trunk/src/com/sun/jini/norm/NormServerBaseImpl.java

Modified: incubator/river/jtsk/trunk/src/com/sun/jini/norm/NormServerBaseImpl.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/src/com/sun/jini/norm/NormServerBaseImpl.java?rev=941185&r1=941184&r2=941185&view=diff
==============================================================================
--- incubator/river/jtsk/trunk/src/com/sun/jini/norm/NormServerBaseImpl.java (original)
+++ incubator/river/jtsk/trunk/src/com/sun/jini/norm/NormServerBaseImpl.java Wed May  5 07:35:52 2010
@@ -1336,6 +1336,7 @@ abstract class NormServerBaseImpl
      * so it will not hang up in-progress remote calls
      */
     private class SnapshotThread extends InterruptedStatusThread {
+    private boolean snapshotRequested = false;
 	/** Create a daemon thread */
 	private SnapshotThread() {
 	    super("snapshot thread");
@@ -1344,6 +1345,7 @@ abstract class NormServerBaseImpl
 
 	/** Signal this thread that is should take a snapshot */
 	private synchronized void takeSnapshot() {
+		snapshotRequested = true;
 	    notifyAll();
 	}
 
@@ -1351,9 +1353,13 @@ abstract class NormServerBaseImpl
 	    while (!hasBeenInterrupted()) {
 		synchronized (this) {
 		    try {
-			wait();
+		    while (!snapshotRequested) {
+		    	wait();
+		    }
 		    } catch (InterruptedException e) {
 			return;
+		    } finally {
+		    	snapshotRequested = false;
 		    }
 		}