2 Replies Latest reply on Apr 8, 2009 10:07 PM by William Wong

    JMS Exception - connectiion closed by JBoss

    William Wong Newbie

      I cached the QueueConnection, QueueSession, and QueueSender on my application deployed as JBoss Service (sar); however, I got JMS Exception when I send the message if it has been idle for a period of time. In order words, if there’s no message send for a period of time, it seems JBoss will close the socket or connection. Here’s the stack trace:

      org.jboss.jms.exception.MessagingJMSException: Failed to invoke
      at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:271)
      at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:205)
      at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
      at org.jboss.jms.client.delegate.ClientSessionDelegate.org$jboss$jms$client$delegate$ClientSessionDelegate$send$aop(ClientSessionDelegate.java:477)
      at org.jboss.jms.client.delegate.ClientSessionDelegate$send_6145266547759487588.invokeNext(ClientSessionDelegate$send_6145266547759487588.java)
      at org.jboss.jms.client.container.SessionAspect.handleSend(SessionAspect.java:661)
      at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect28.invoke(SessionAspect28.java)
      at org.jboss.jms.client.delegate.ClientSessionDelegate$send_6145266547759487588.invokeNext(ClientSessionDelegate$send_6145266547759487588.java)
      at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:92)
      at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
      at org.jboss.jms.client.delegate.ClientSessionDelegate$send_6145266547759487588.invokeNext(ClientSessionDelegate$send_6145266547759487588.java)
      at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
      at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
      at org.jboss.jms.client.delegate.ClientSessionDelegate$send_6145266547759487588.invokeNext(ClientSessionDelegate$send_6145266547759487588.java)
      at org.jboss.jms.client.delegate.ClientSessionDelegate.send(ClientSessionDelegate.java)
      at org.jboss.jms.client.container.ProducerAspect.handleSend(ProducerAspect.java:269)
      at org.jboss.aop.advice.org.jboss.jms.client.container.ProducerAspect39.invoke(ProducerAspect39.java)
      at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
      at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
      at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
      at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
      at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)
      at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:164)
      at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:207)
      at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:145)
      at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:136)

      Caused by: java.lang.IllegalStateException: Cannot find object in dispatcher with id i-lo17t3tf-1-lf95t3tf-2zzng9-e1l3la
      at org.jboss.jms.wireformat.SessionSendRequest.serverInvoke(SessionSendRequest.java:101)
      at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:387)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
      at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
      at org.jboss.remoting.Client.invoke(Client.java:1634)
      at org.jboss.remoting.Client.invoke(Client.java:548)
      at org.jboss.remoting.Client.invoke(Client.java:536)
      at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)

      Wondering is there any parameters that I can configure to tell JBoss don’t close the socket/connection even no activity for long times. By the way, should QueueConnectiion, QueueSession and QueueSender be cached?

      Thanks in advance