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

PooledConnectionFactory throws 'IllegalStateException: Pool not open' after re-init

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.13.3
    • 5.13.4, 5.14.0
    • Pool
    • None
    • Patch Available
    • Patch

    Description

      Blueprint:

      <cm:property-placeholder persistent-id=".." update-strategy="reload" />
      <bean id="pooledConnectionFactory" class="org.apache.activemq.jms.pool.PooledConnectionFactory"
              init-method="start" destroy-method="stop">
      ...
      </bean>
      

      or Java:

      org.apache.activemq.jms.pool.PooledConnectionFactory pcf = new org.apache.activemq.jms.pool.PooledConnectionFactory();
      pcf.start();
      ...
      pcf.stop();
      pcf.start();
      // producer.send(textMsg);
      

      Stacktrace:

      Caused by: javax.jms.IllegalStateException: java.lang.IllegalStateException: Pool not open
      	at org.apache.activemq.jms.pool.ConnectionPool.createSession(ConnectionPool.java:159)
      	at org.apache.activemq.jms.pool.PooledConnection.createSession(PooledConnection.java:167)
      	at org.talend.ipaas.rt.amqsource.AMQEventSource.createJmsSession(AMQEventSource.java:282)
      	at org.talend.ipaas.rt.amqsource.AMQEventSource.sendEvent(AMQEventSource.java:117)
      	... 2 more
      Caused by: java.lang.IllegalStateException: Pool not open
      	at org.apache.commons.pool2.impl.BaseGenericObjectPool.assertOpen(BaseGenericObjectPool.java:672)
      	at org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:339)
      	at org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:279)
      	at org.apache.activemq.jms.pool.ConnectionPool.createSession(ConnectionPool.java:141)
      	... 5 more
      

      Attachments

        1. PooledConnectionFactory.patch
          0.7 kB
          Alexey Markevich

        Activity

          People

            Unassigned Unassigned
            amarkevich Alexey Markevich
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: