0 Replies Latest reply on Nov 4, 2010 11:27 AM by arjan tijms

    Exception upon closing connection when queue already stopped

    arjan tijms Novice



      I'm using JBoss messaging with JBoss AS 5.1. In the web module of an EAR application I have a connection to a queue, that is declared via a service file in the root of my EAR.


      When I attempt to close this connection when the web module receives the shutdown/destroy event, I get the following exception:



      16:08:36,194 INFO  [TxConnectionManager] throwable from unregister connection
          at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionClosed(TxConnectionManager.java:720)
          at org.jboss.resource.adapter.jms.JmsManagedConnection.sendEvent(JmsManagedConnection.java:598)
          at org.jboss.resource.adapter.jms.JmsSession.closeSession(JmsSession.java:811)
          at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.close(JmsSessionFactoryImpl.java:285)



      When I look in the server log, I see that the queue has been stopped just prior to this:


      16:08:36,071 INFO  [QueueService] Queue[/queue/myLocalQueue] stopped
      16:08:36,071 INFO  [QueueService] Queue[/queue/myLocalUpdateQueue] stopped
      16:08:36,072 INFO  [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' from JNDI name 'java:JmsXA'
      16:08:36,073 INFO  [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXAWeb' from JNDI name 'java:JmsXAWeb'
      16:08:36,093 INFO  [ServerPeer] JMS ServerPeer[0] stopped



      What would be the correct thing to do here? There isn't any isClosed() method on the javax.jms.Connection.