Author: ron.sigal(a)jboss.com
Date: 2009-05-07 21:53:43 -0400 (Thu, 07 May 2009)
New Revision: 5157
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java
Log:
(1) JBREM-1129: Uses LeasePinger.TIME_STAMP; (2) JBREM-1128: uses
"useClientConnectIdentity" parameter.
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java
===================================================================
---
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java 2009-05-08
01:52:32 UTC (rev 5156)
+++
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java 2009-05-08
01:53:43 UTC (rev 5157)
@@ -416,6 +416,19 @@
{
Client client = (Client) configuration.get(Client.CLIENT);
ConnectionListener listener = (ConnectionListener)
configuration.remove(Client.CONNECTION_LISTENER);
+ boolean useClientConnectionIdentity = false;
+ if (configuration != null)
+ {
+ Object o = configuration.get(Remoting.USE_CLIENT_CONNECTION_IDENTITY);
+ if (o instanceof String)
+ {
+ useClientConnectionIdentity = Boolean.valueOf((String) o).booleanValue();
+ }
+ else
+ {
+ log.warn("value of " + Remoting.USE_CLIENT_CONNECTION_IDENTITY +
" must be a String: " + o);
+ }
+ }
synchronized (clientLeaseLock)
{
@@ -438,7 +451,7 @@
String leasePingerId = new GUID().toString();
Map requestMap = new HashMap();
requestMap.put(LeasePinger.LEASE_PINGER_ID, leasePingerId);
- requestMap.put("time", Long.toString(System.currentTimeMillis()));
+ requestMap.put(LeasePinger.TIME_STAMP,
Long.toString(System.currentTimeMillis()));
log.debug(this + " initiating lease for leasePingerId " +
leasePingerId);
InvocationRequest ir = new InvocationRequest(invokerSessionID, null,
"$PING$", requestMap, new HashMap(), null);
@@ -468,6 +481,7 @@
leasePinger = new LeasePinger(this, invokerSessionID,
defaultLeasePeriod);
leasePinger.setLeasePingerId(leasePingerId);
+
leasePinger.setUseClientConnectionIdentity(useClientConnectionIdentity);
leasePinger.addClient(clientSessionID, configuration, leasePeriod);
leasePinger.startPing();
}