JBoss Remoting SVN: r5146 - remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/callback.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-07 00:45:05 -0400 (Thu, 07 May 2009)
New Revision: 5146
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/callback/DefaultCallbackErrorHandler.java
Log:
JBREM-1112 (and others to be named): Reduced level of a log statement.
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/callback/DefaultCallbackErrorHandler.java
===================================================================
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/callback/DefaultCallbackErrorHandler.java 2009-05-07 04:44:38 UTC (rev 5145)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/callback/DefaultCallbackErrorHandler.java 2009-05-07 04:45:05 UTC (rev 5146)
@@ -125,7 +125,7 @@
throw ex;
}
- log.warn(this + " reached maximum number of callback errors allowed (" +
+ log.debug(this + " reached maximum number of callback errors allowed (" +
numOfErrorsAllowed + "). Will clean up callback hander now.");
if (serverInvoker != null)
15 years, 9 months
JBoss Remoting SVN: r5145 - remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-07 00:44:38 -0400 (Thu, 07 May 2009)
New Revision: 5145
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Version.java
Log:
JBREM-1112 (and others to be named): Updated version.
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Version.java
===================================================================
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Version.java 2009-05-07 04:43:50 UTC (rev 5144)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Version.java 2009-05-07 04:44:38 UTC (rev 5145)
@@ -22,6 +22,8 @@
package org.jboss.remoting;
+import java.util.Date;
+
/**
* @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
*/
@@ -32,15 +34,15 @@
public static final byte VERSION_2 = 2;
public static final byte VERSION_2_2 = 22;
- public static final String VERSION = "2.2.2.SP11_JBREM-1112:042409";
+ public static final String VERSION = "2.2.2.SP11_JBREM-1112:050709-00:43";
private static final byte byteVersion = VERSION_2_2;
private static byte defaultByteVersion = byteVersion;
private static boolean performVersioning = true;
-// static
-// {
-// System.out.println("Remoting version: " + VERSION);
-// }
+ static
+ {
+ System.out.println("Remoting version: " + VERSION);
+ }
public static final String PRE_2_0_COMPATIBLE = "jboss.remoting.pre_2_0_compatible";
15 years, 9 months
JBoss Remoting SVN: r5144 - remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-07 00:43:50 -0400 (Thu, 07 May 2009)
New Revision: 5144
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/ServerInvoker.java
Log:
JBREM-1112 (and others to be named): Made removeCallbackHandler() public.
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/ServerInvoker.java
===================================================================
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/ServerInvoker.java 2009-05-07 04:42:17 UTC (rev 5143)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/ServerInvoker.java 2009-05-07 04:43:50 UTC (rev 5144)
@@ -320,6 +320,11 @@
{
return timeout;
}
+
+ public ConnectionNotifier getConnectionNotifier()
+ {
+ return connectionNotifier;
+ }
public boolean isLeaseActivated()
{
@@ -838,28 +843,7 @@
//then it will just use that without having to do a lookup or HashMap iteration over
//values
- ServerInvocationHandler handler = null;
-
- if (singleHandler != null)
- {
- handler = singleHandler;
- }
- else
- {
- if (subsystem != null)
- {
- handler = (ServerInvocationHandler)handlers.get(subsystem.toUpperCase());
- }
- else
- {
- // subsystem not specified, so will hope for a default one being set
- if (!handlers.isEmpty())
- {
- if (trace) { log.trace(this + " handling invocation with no subsystem explicitely specified, using the default handler"); }
- handler = (ServerInvocationHandler)handlers.values().iterator().next();
- }
- }
- }
+ ServerInvocationHandler handler = findInvocationHandler(subsystem);
if (param instanceof InternalInvocation)
{
@@ -1041,7 +1025,7 @@
}
return buffer.toString();
}
-
+
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
@@ -1518,6 +1502,10 @@
if (registerCallbackListeners)
{
connectionNotifier.addListenerFirst(callbackHandler);
+ if(leasePeriod > 0)
+ {
+ leaseManagement = true;
+ }
}
handler.addListener(callbackHandler);
}
@@ -1526,6 +1514,14 @@
ServerInvokerCallbackHandler callbackHandler = removeCallbackHandler(invocation);
if(callbackHandler != null)
{
+ if (registerCallbackListeners)
+ {
+// connectionNotifier.removeListener(callbackHandler);
+ removeConnectionListener(callbackHandler);
+ }
+
+ callbackHandler.destroy();
+
if(handler == null)
{
throw new InvalidConfigurationException(
@@ -1540,8 +1536,6 @@
handler.removeListener(callbackHandler);
if(trace) { log.trace("ServerInvoker (" + this + ") removing server callback handler " + callbackHandler + "."); }
-
- callbackHandler.destroy();
}
else
{
@@ -1656,7 +1650,34 @@
}
return result;
}
+
+ protected ServerInvocationHandler findInvocationHandler(String subsystem)
+ {
+ ServerInvocationHandler handler = null;
+ if (singleHandler != null)
+ {
+ handler = singleHandler;
+ }
+ else
+ {
+ if (subsystem != null)
+ {
+ handler = (ServerInvocationHandler)handlers.get(subsystem.toUpperCase());
+ }
+ else
+ {
+ // subsystem not specified, so will hope for a default one being set
+ if (!handlers.isEmpty())
+ {
+ if (trace) { log.trace(this + " handling invocation with no subsystem explicitely specified, using the default handler"); }
+ handler = (ServerInvocationHandler)handlers.values().iterator().next();
+ }
+ }
+ }
+ return handler;
+ }
+
/**
* Called prior to an invocation.
* TODO is sending in the arg appropriate?
@@ -1920,7 +1941,7 @@
return callbackHandler;
}
- private ServerInvokerCallbackHandler removeCallbackHandler(InvocationRequest invocation)
+ public ServerInvokerCallbackHandler removeCallbackHandler(InvocationRequest invocation)
{
String id = ServerInvokerCallbackHandler.getId(invocation);
ServerInvokerCallbackHandler callbackHandler = null;
@@ -1929,8 +1950,28 @@
{
callbackHandler = (ServerInvokerCallbackHandler) callbackHandlers.remove(id);
}
+ log.info(this + " removed " + callbackHandler);
return callbackHandler;
}
+
+ public void shutdownCallbackHandler(ServerInvokerCallbackHandler callbackHandler, InvocationRequest invocation)
+ {
+ removeCallbackHandler(invocation);
+ if (registerCallbackListeners)
+ {
+ removeConnectionListener(callbackHandler);
+ }
+ ServerInvocationHandler handler = findInvocationHandler(invocation.getSessionId());
+ if (handler != null)
+ {
+ handler.removeListener(callbackHandler);
+ if(trace) { log.trace(this + " removing server callback handler " + callbackHandler + "."); }
+ }
+ else
+ {
+ log.debug(this + " cannot remove " + callbackHandler + ": associated ServerInvocationHandler not longer exists");
+ }
+ }
// Inner classes --------------------------------------------------------------------------------
15 years, 9 months
JBoss Remoting SVN: r5143 - remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-07 00:42:17 -0400 (Thu, 07 May 2009)
New Revision: 5143
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java
Log:
JBREM-1112 (and others to be named): Added some logging statements.
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java
===================================================================
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java 2009-05-06 08:42:04 UTC (rev 5142)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java 2009-05-07 04:42:17 UTC (rev 5143)
@@ -453,6 +453,7 @@
*/
public synchronized boolean removeConnectionListener(ConnectionListener listener)
{
+ log.debug(this + ".removeConnectionListener(" + listener + ")");
boolean isRemoved = false;
// synchronized (connectionValidatorLock)
{
@@ -476,6 +477,10 @@
connectionValidator = null;
connectionValidatorKey = null;
}
+ if (connectionValidator == null)
+ {
+ log.debug(this + " set connectionValidator to null");
+ }
}
return isRemoved;
}
@@ -557,6 +562,7 @@
public void connect(ConnectionListener listener, Map metadata) throws Exception
{
log.debug(this + ".connect(" + listener + ")");
+ log.debug(this + ": metadata = " + metadata);
if (isConnected())
return;
@@ -589,6 +595,7 @@
*/
public synchronized void disconnect()
{
+ log.debug(this + " entering disconnect()");
if (invoker != null)
{
// this is a noop if no lease is active
@@ -1814,6 +1821,7 @@
}
temp.put(CLIENT, this);
temp.put(CONNECTION_LISTENER, listener);
+ log.debug(this + ": temp = " + temp);
log.debug(this + " calling MicroRemoteClientInvoker.establishLease()");
invoker.establishLease(sessionId, temp, leasePeriod);
}
15 years, 9 months
JBoss Remoting SVN: r5142 - remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-06 04:42:04 -0400 (Wed, 06 May 2009)
New Revision: 5142
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java
Log:
JBREM-1112 (and others to be named): Updated some logging statements.
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java
===================================================================
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java 2009-05-06 04:28:37 UTC (rev 5141)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java 2009-05-06 08:42:04 UTC (rev 5142)
@@ -463,8 +463,10 @@
isRemoved = connectionValidator.removeConnectionListener(this, listener);
if (connectionValidator.isStopped())
{
- connectionValidators.remove(connectionValidatorKey);
- log.debug(this + " removed from static map: " + connectionValidator);
+ if (connectionValidators.remove(connectionValidatorKey) != null)
+ {
+ log.debug(this + ".removeConnectionListener() removed from static map: " + connectionValidator);
+ }
connectionValidator = null;
connectionValidatorKey = null;
}
@@ -604,8 +606,10 @@
}
if (connectionValidator.isStopped())
{
- connectionValidators.remove(connectionValidatorKey);
- log.debug(this + " removed from static map: " + connectionValidator);
+ if (connectionValidators.remove(connectionValidatorKey) != null)
+ {
+ log.debug(this + ".disconnect() removed from static map: " + connectionValidator);
+ }
}
}
// connectionValidator.stop();
@@ -1646,7 +1650,7 @@
// synchronized (connectionValidatorLock)
{
// disconnect();
- log.debug(this + " entering notifyAndDisconnect()");
+ log.debug(this + " entering notifyAndDisconnect(): " + connectionValidator);
if (connectionValidator != null)
{
synchronized (connectionValidator)
@@ -1666,8 +1670,10 @@
ConnectionListener listener = (ConnectionListener) it.next();
connectionValidator.removeConnectionListener(this, listener);
}
- connectionValidators.remove(connectionValidatorKey);
- log.debug(this + " removed from static map: " + connectionValidator);
+ if (connectionValidators.remove(connectionValidatorKey) != null)
+ {
+ log.debug(this + ".notifyAndDisconnect() removed from static map: " + connectionValidator);
+ }
}
}
connectionValidator = null;
15 years, 9 months
JBoss Remoting SVN: r5141 - remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-06 00:28:37 -0400 (Wed, 06 May 2009)
New Revision: 5141
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java
Log:
JBREM-1112 (and others to be named): establishLease() goes on to call Client.addConnectionListener() if there is an existing leasePinger..
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-06 04:26:49 UTC (rev 5140)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java 2009-05-06 04:28:37 UTC (rev 5141)
@@ -344,12 +344,12 @@
{
synchronized(clientLeaseLock)
{
- log.debug(this + " entering terminateLease()");
if (passedLeasePinger != null && passedLeasePinger != leasePinger)
{
log.debug(this + ": " + passedLeasePinger + " != " + leasePinger);
return;
}
+ log.debug(this + " entering terminateLease() for " + leasePinger);
if(leasePinger != null)
{
leasePinger.setDisconnectTimeout(disconnectTimeout);
@@ -394,6 +394,7 @@
{
log.debug(this + " leasePinger is null: must have been shut down already");
}
+ log.debug(this + " leaving terminateLease() for " + leasePinger);
}
}
@@ -424,9 +425,9 @@
{
leasePinger.addClient(clientSessionID, configuration, leasePeriod);
log.debug(this + " added client with session ID " + clientSessionID + " to " + leasePinger);
- return;
}
-
+ else
+ {
try
{
if(trace) { log.trace(this + " sending initial lease ping to server to determine if server has leasing enabled."); }
@@ -478,6 +479,7 @@
e.initCause(throwable);
throw e;
}
+ }
// finally
{
// Client client = (Client) configuration.get(Client.CLIENT);
15 years, 9 months
JBoss Remoting SVN: r5140 - remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-06 00:26:49 -0400 (Wed, 06 May 2009)
New Revision: 5140
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/LeasePinger.java
Log:
JBREM-1112 (and others to be named): Added a logging statement.
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/LeasePinger.java
===================================================================
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/LeasePinger.java 2009-05-06 04:26:24 UTC (rev 5139)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/LeasePinger.java 2009-05-06 04:26:49 UTC (rev 5140)
@@ -81,6 +81,7 @@
Iterator it = clients.values().iterator();
{
Client client = (Client) it.next();
+ log.debug(this + " calling " + client + ".notifyAndDisconnect()");
client.notifyAndDisconnect();
it.remove();
}
@@ -320,8 +321,8 @@
}
}
- log.trace(this + " sending ping to server. Currently managing lease " +
- "for following clients:\n" + sb.toString());
+ log.debug(this + " sending ping to server. Currently managing lease " +
+ "for following clients:\n" + sb.toString());
}
Map clientsClone = new ConcurrentHashMap(clientSessionIds);
15 years, 9 months
JBoss Remoting SVN: r5139 - remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-06 00:26:24 -0400 (Wed, 06 May 2009)
New Revision: 5139
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Lease.java
Log:
JBREM-1112 (and others to be named): Changed a logging statement.
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Lease.java
===================================================================
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Lease.java 2009-05-06 04:25:58 UTC (rev 5138)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Lease.java 2009-05-06 04:26:24 UTC (rev 5139)
@@ -124,7 +124,7 @@
if (val != null && val instanceof ClientHolder)
{
ClientHolder clientHolder = (ClientHolder) val;
- log.debug(this + " " + clientHolder.getSessionId());
+ log.debug(leasePingerId + ": " + clientHolder.getSessionId());
}
}
15 years, 9 months
JBoss Remoting SVN: r5138 - remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-06 00:25:58 -0400 (Wed, 06 May 2009)
New Revision: 5138
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/ConnectionValidator.java
Log:
JBREM-1112 (and others to be named): WaitOnConnectionCheckTimerTask.run() immediately cancels ConnectionValidator.run() when connection fails.
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/ConnectionValidator.java
===================================================================
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/ConnectionValidator.java 2009-05-06 04:24:25 UTC (rev 5137)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/ConnectionValidator.java 2009-05-06 04:25:58 UTC (rev 5138)
@@ -839,6 +839,7 @@
log.debug(ConnectionValidator.this + "'s connection is invalid");
// notifyListeners(new Exception("Could not connect to server!"));
+ ConnectionValidator.super.cancel();
if (stopLeaseOnFailure)
{
15 years, 9 months
JBoss Remoting SVN: r5137 - remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-06 00:24:25 -0400 (Wed, 06 May 2009)
New Revision: 5137
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java
Log:
JBREM-1112 (and others to be named): notifyAndDisconnect() synchronized on the connectionValidator.
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java
===================================================================
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java 2009-05-06 00:20:15 UTC (rev 5136)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Client.java 2009-05-06 04:24:25 UTC (rev 5137)
@@ -1646,26 +1646,30 @@
// synchronized (connectionValidatorLock)
{
// disconnect();
+ log.debug(this + " entering notifyAndDisconnect()");
if (connectionValidator != null)
{
- log.debug(this + " calling connectionValidator.notifyListeners()");
- connectionValidator.notifyListeners(new Exception("Could not connect to server!"));
- Iterator it = connectionListeners.iterator();
- while (it.hasNext())
+ synchronized (connectionValidator)
{
- ConnectionListener listener = (ConnectionListener) it.next();
- connectionValidator.removeConnectionListener(this, listener);
+ if (connectionValidator.isStopped())
+ {
+ log.debug(this + ": " + connectionValidator + " is stopped");
+ }
+ else
+ {
+ log.debug(this + ": " + connectionValidator + " is not stopped");
+ log.debug(this + " calling connectionValidator.notifyListeners()");
+ connectionValidator.notifyListeners(new Exception("Could not connect to server!"));
+ Iterator it = connectionListeners.iterator();
+ while (it.hasNext())
+ {
+ ConnectionListener listener = (ConnectionListener) it.next();
+ connectionValidator.removeConnectionListener(this, listener);
+ }
+ connectionValidators.remove(connectionValidatorKey);
+ log.debug(this + " removed from static map: " + connectionValidator);
+ }
}
- if (connectionValidator.isStopped())
- {
- connectionValidators.remove(connectionValidatorKey);
- log.debug(this + " removed from static map: " + connectionValidator);
- }
- else
- {
- log.debug(this + ": " + connectionValidator + " is not stopped");
- }
-
connectionValidator = null;
connectionValidatorKey = null;
}
@@ -1680,6 +1684,7 @@
}
connected = false;
+ log.debug(this + " leaving notifyAndDisconnect()");
}
}
@@ -1793,6 +1798,7 @@
}
}
+ log.debug(this + " enableLease: " + enableLease);
if (enableLease)
{
Map temp = new HashMap(configuration);
15 years, 9 months