Hi,
After some further experimentation I think I finally found the critical part.
I can reproduce the misbehaviour by adding a trivial ExceptionListener to the connection
of the topic example included with the Messaging distribution
(org.jboss.example.jms.topic.TopicExample):
| ...
| connection = cf.createConnection();
| connection.setExceptionListener(new ExceptionListener() {
| public void onException(JMSException jmse) {
| }
| });
| ...
|
You also have to take care that the subscriber is running for some time (e.g. suppress
publishing the message it is waiting for and extending the waiting time to, say, a
minute).
During this time you can look at DEBUG output and/or repeatedly run netstat to see that a
new connection to the messaging port is opened and closed every two seconds:
| ...
| [java] 11:59:37,410 DEBUG @main [MessageIdGeneratorFactory] checked out
MessageIdGenerator for server.0, reference count is 1
| [java] 11:59:38,160 DEBUG @main [JBossSession] attempting to create consumer for
destination:JBossTopic[testTopic]
| [java] 11:59:39,457 DEBUG @Timer-0 [MicroSocketClientInvoker] Setting
ClientSocket class name to: org.jboss.jms.client.remoting.ClientSocketWrapper
| [java] 11:59:39,457 DEBUG @Timer-0 [SocketClientInvoker] Setting
SocketClientInvoker::timeout to: 1000
| [java] 11:59:39,457 DEBUG @Timer-0 [MicroSocketClientInvoker] Setting
ClientSocket class name to: org.jboss.jms.client.remoting.ClientSocketWrapper
| [java] 11:59:39,457 DEBUG @Timer-0 [SocketClientInvoker] Setting
SocketClientInvoker::timeout to: 1000
| [java] 11:59:39,472 DEBUG @Timer-0 [MicroRemoteClientInvoker] connect called for:
org.jboss.remoting.transport.socket.SocketClientInvoker@15356d5
| [java] 11:59:39,472 DEBUG @Timer-0 [MicroRemoteClientInvoker] disconnect called
for: org.jboss.remoting.transport.socket.SocketClientInvoker@15356d5
| [java] 11:59:41,472 DEBUG @Timer-0 [MicroSocketClientInvoker] Setting
ClientSocket class name to: org.jboss.jms.client.remoting.ClientSocketWrapper
| [java] 11:59:41,472 DEBUG @Timer-0 [SocketClientInvoker] Setting
SocketClientInvoker::timeout to: 1000
| [java] 11:59:41,472 DEBUG @Timer-0 [MicroSocketClientInvoker] Setting
ClientSocket class name to: org.jboss.jms.client.remoting.ClientSocketWrapper
| [java] 11:59:41,472 DEBUG @Timer-0 [SocketClientInvoker] Setting
SocketClientInvoker::timeout to: 1000
| [java] 11:59:41,472 DEBUG @Timer-0 [MicroRemoteClientInvoker] connect called for:
org.jboss.remoting.transport.socket.SocketClientInvoker@fb6354
| [java] 11:59:41,488 DEBUG @Timer-0 [MicroRemoteClientInvoker] disconnect called
for: org.jboss.remoting.transport.socket.SocketClientInvoker@fb6354
| ...
|
This is not the initial problem of this thread (JMS Exceptions / Mismatch of
JBossSerialization version), but I'm rather certain that it is related to this issue,
as it leads to connection timeouts. Anyway, the frequent connection creation is a problem
on it's own right.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002240#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...