Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3430

activemq-web: SessionPool.returnSession() should discard sessions that are closed.

    XMLWordPrintableJSON

Details

    • Patch Available

    Description

      In activemq.web project, SessionPool.returnSession() does not check if the session is still open. As long as the session isn't null, its returned back to the pool.
      At least one customer reported a problem when using the web console for browsing a queue, where the session was already closed.

      javax.jms.IllegalStateException: The Session is closed
      at org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:722)
      at org.apache.activemq.ActiveMQSession.createQueue(ActiveMQSession.java:1141)
      at org.apache.activemq.web.QueueBrowseQuery.getQueue(QueueBrowseQuery.java:65)
      at org.apache.activemq.web.QueueBrowseQuery.createBrowser(QueueBrowseQuery.java:91)
      at org.apache.activemq.web.QueueBrowseQuery.getBrowser(QueueBrowseQuery.java:54)
      at sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
      ...
      

      Not sure what triggered the closure of the session, however once it is closed it should not be returned to the pool but be discarded. If its not discarded, then the pool will always return the closed session and any invocations on the session return an exception. Restarting the broker is the only remedy.

      Attachments

        1. AMQ-3430.patch
          2 kB
          Torsten Mielke

        Activity

          People

            dejanb Dejan Bosanac
            tmielke Torsten Mielke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: