[jboss-user] [JBoss Remoting] New message: "Re: Client hangs when get JMS connection factory"

Ron Sigal do-not-reply at jboss.com
Sat Jan 9 20:30:02 EST 2010

User development,

A new message was posted in the thread "Client hangs when get JMS connection factory":


Author  : Ron Sigal
Profile : http://community.jboss.org/people/ron.sigal@jboss.com

Hi guys,

I'm going to talk a little about how ConnectionValidator works, which might help to clear up some confusion.  

Maybe the fact that "connection" can mean different things in different contexts is the source of some confusion.  A connection could be represented, for example, by a pair of sockets.  It is in that sense that a Remoting client invoker maintains a "connection pool".  It is, essentially, a set of sockets, each connected to a socket at the other end of the connection.  But, to an application like JBossMessaging (JBM), a connection is something at a higher level.  A JBM connection is associated with a Remoting client invoker, which manages a set of lower level connections.

Now, Remoting's ConnectionValidator checks for the usability of a higher level connection.  It has its own client invoker, with its own lower level connection pool.  When it can't get a response from the server, it assumes that the network between the client and the server is broken and it tells any registered listeners, such as JBM, that, in effect, the higher level connection is broken.

When a ConnectionValidator tells JBM that the higher level connection is broken, then JBM will tear down (and possibly try to recreate) the connection, which includes shutting down the associated Remoting client invoker and its connection pool.  So, "validatorPingTimeout" determines how long a ConnectionValidator will wait until it considers the higher level connection to be broken.  "timeout" determines how long read() operations on the client and the server will wait before timing out.

I hope that helps to clarify things.

Now, if you pull the ethernet connection, ConnectionValidator +*should*+ detect that network failure.  In fact, I believe it works, having tested it myself.  Li Lin and Mingjun Jiang, is there no evidence in the client log that ConnectionValidator is informing JBM about the connection failure?

By the way, the "timeout" value is interpreted as milliseconds.  I noticed a "timeout" set to "10" earlier in the thread.


To reply to this message visit the message page: http://community.jboss.org/message/519114#519114

More information about the jboss-user mailing list