[jboss-user] [JBoss Messaging] - Re: can not catch excption when jboss as is down
nkhadakk
do-not-reply at jboss.com
Fri Oct 26 16:05:47 EDT 2007
JBoss AS 4.2.1/JBM 1.3 GA/ Spring 2.x
I am running into a similar issue(i think).
My application has a listener on a remote client (coded as per jboss doc) connected to the JMS provider (jboss 4.2.x/jbm 1.3). Everything works fine as long as certain
sequence of operations is maintained. Specifically if the JBoss server is shutdown and restarted, i see the following errors in the LIstener logs :
13:35:16,396 DEBUG [Timer-0]: org.jboss.remoting.LeasePinger - LeasePinger[SocketClientInvoker[57e787, bisocket://127.0.0.1:4458](3j001-8mwhow-f893r9kl-1-f893r9yr-5)] failed to ping to server
| org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://127.0.0.1:4458/?clientMaxPoolSize=50&clientSocketClass=\
| org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&\
| marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&\
| numberOfRetries=1&socket.check_connection=false&timeout=10000&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat]
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:530)
| at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:353)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.LeasePinger.sendClientPing(LeasePinger.java:283)
| at org.jboss.remoting.LeasePinger.access$000(LeasePinger.java:20)
| at org.jboss.remoting.LeasePinger$LeaseTimerTask.run(LeasePinger.java:315)
| at java.util.TimerThread.mainLoop(Timer.java:512)
| at java.util.TimerThread.run(Timer.java:462)
| Caused by: java.net.ConnectException: Connection refused
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
| at java.net.Socket.connect(Socket.java:519)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:187)
| at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.createSocket(BisocketClientInvoker.java:360)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:801)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:526)
| ... 7 more
| 13:35:16,397 WARN [Timer-0]: org.jboss.remoting.LeasePinger - LeasePinger[SocketClientInvoker[57e787, bisocket://127.0.0.1:4458](3j001-8mwhow-f893r9kl-1-f893r9yr-5)] failed to ping to server: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://127.0.0.1:4458/?clientMaxPoolSize=50&clientSocketClass=\
| org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&\
| marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&\
| numberOfRetries=1&socket.check_connection=false&timeout=10000&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat]
| 13:35:17,171 DEBUG [URIListener-2]: org.springframework.jms.listener.DefaultMessageListenerContainer - Consumer [JBossMessageConsumer->ConsumerDelegate[28384121, ID=73]] of session [JBossSession->SessionDelegate[8574467, ID=71]] did not receive a message
| 13:35:17,184 DEBUG [URIListener-1]: org.springframework.jms.listener.DefaultMessageListenerContainer - Consumer
Now if the JBoss AS comes up again, the JBoss Remoting client code appears to connect
successfully to JBM. Only issue is since the above stack trace is never bubbled up to my Listener code, my listener continues to be registered to a legacy provider.. and as a result never gets any new messages.
This issue is solvable(with a hack) IF i stop pooling JMS consumers in my listener code and create new JMS Consumer for every recieve poll.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099484#4099484
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099484
More information about the jboss-user
mailing list