Author: bershath27
Date: 2012-02-13 03:05:37 -0500 (Mon, 13 Feb 2012)
New Revision: 6431
Modified:
remoting2/branches/2.5.4.SP3_JBREM-1297/src/main/org/jboss/remoting/Client.java
Log:
JBPAPP-8030
Modified: remoting2/branches/2.5.4.SP3_JBREM-1297/src/main/org/jboss/remoting/Client.java
===================================================================
---
remoting2/branches/2.5.4.SP3_JBREM-1297/src/main/org/jboss/remoting/Client.java 2012-02-08
13:17:29 UTC (rev 6430)
+++
remoting2/branches/2.5.4.SP3_JBREM-1297/src/main/org/jboss/remoting/Client.java 2012-02-13
08:05:37 UTC (rev 6431)
@@ -1904,6 +1904,12 @@
}
}
+
+ static Object getConnectionValidatorLock()
+ {
+ return connectionValidatorLock;
+ }
+
// Protected
------------------------------------------------------------------------------------
// Private
--------------------------------------------------------------------------------------
@@ -2040,17 +2046,25 @@
//
// 1. a. This method calls MicroRemoteClientInvoker.establishLease()
// b. MicroRemoteClientInvoker.establishLease() synchronizes on
MicroRemoteClientInvoker.clientLeaseLock
- // and calls Client.addConnectionListener()
- // c. Client.addConnectionListener() synchronizes on
Client.connectionValidatorLock
+ // c. MicroRemoteClientInvoker.establishLease() calls
Client.addConnectionListener()
+ // d. Client.addConnectionListener() synchronizes on
Client.connectionValidatorLock
//
- // 2. a. Client.addConnectionListener() synchronizes on
Client.connectionValidatorLock and calls
- // new ConnectionValidator()
- // b. new ConnectionValidator() calls
MicroRemoteClientInvoker.getLeasePinger(), which
- // synchronizes on MicroRemoteClientInvoker.clientLeaseLock
+ // 2. a. Client.addConnectionListener() synchronizes on
Client.connectionValidatorLock
+ // b. Client.addConnectionListener() calls new ConnectionValidator()
+ // c. new ConnectionValidator() calls
MicroRemoteClientInvoker.getLeasePinger()
+ // d. MicroRemoteClientInvoker.getLeasePinger() synchronizes on
MicroRemoteClientInvoker.clientLeaseLock
//
- // By synchronizing on connectionValidatorLock here, we assure that both
sequences acquire
+ // 3. a. ConnectionValidator$WaitOnConnectionCheckTimerTask.run() synchronizes
on Client.connectionValidatorLock
+ // b. ConnectionValidator$WaitOnConnectionCheckTimerTask.run() calls
MicroRemoteClientInvoker.terminateLease()
+ // c. MicroRemoteClientInvoker.terminateLease() synchronizes on
MicroRemoteClientInvoker.clientLeaseLock
+ // d. MicroRemoteClientInvoker.terminateLease() calls LeasePinger.stopPing()
+ // e. LeasePinger.stopPing() calls Client.notifyListeners()
+ // f. Client.notifyListeners() synchronizes on
Client.connectionValidatorLock
+ //
+ // By synchronizing on connectionValidatorLock here, we assure that all
sequences acquire
// Client.connectionValidatorLock first and then acquire
MicroRemoteClientInvoker.clientLeaseLock.
//
+ // See JBREM-1242 and JBREM-1297.
synchronized(connectionValidatorLock)
{
invoker.establishLease(sessionId, temp, leasePeriod);