Hello While I was involved in maintenance of Pax JMS library I don't remember any issues related to hanging connections...
To be honest this project is in kind of awaiting state, almost killed by the unnecessary move from "javax" to "jakarta"... There's still no jakarta.jmx version of this library (would require similar change in Pax Transx project..). I see that Pax JMS does some special treatment if the implementation of javax.jms.ConnectionFactory is AutoCloseable, but org.apache.activemq.ActiveMQConnectionFactory is not. So it's the responsibility of the application to properly close the connections... That's all I can help with ;( kind regards Grzegorz Grzybek śr., 25 mar 2026 o 10:45 Ephemeris Lappis <[email protected]> napisał(a): > Hello. > > We use pax-jms-config to manage JMS (ActiveMQ) connection factories. It > basically works as expected, but we've recently observed a critical issue : > it seems that with some unidentified conditions, when the features are > installed/uninstalled, or connection factories cfg files updated, the > current connections are not closed, and new ones are created. We can see > the corresponding sockets on both Karaf and ActiveMQ (or in activemq > console). When the maximum configured connection count is exceeded, all the > system (including other JMS clients) fails. > > Is it a known issue ? If not, is there any way to force the jms pool to be > cleaned ? > > Below are our feature structure and configuration file... > Thanks again. > > Best regards. > > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > > <features > > xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" > > name="${project.artifactId}"> > > > <repository> > mvn:org.apache.activemq/activemq-karaf/${version.of.activemq}/xml/features > </repository> > > > <feature > > name="${project.artifactId}" > > version="${project.version}"> > > <feature prerequisite="true" version="${version.of.activemq}"> > activemq-client</feature> > > <feature prerequisite="true">base-system</feature> > > <feature prerequisite="true">pax-jms-activemq</feature> > > <feature prerequisite="true">pax-jms-pool-pooledjms</feature> > > <feature prerequisite="true">pax-jms-config</feature> > > </feature> > > > </features> > > > # Connection configuration > type=activemq > connectionFactoryType=ConnectionFactory > > # Names > name=xxx-jmsosgi.jndi.service.name=jms/xxx > > # Connection factory properties > jms.url=tcp://amq-service:61616 > jms.user=application > jms.password=secret > jms.clientIDPrefix=ID > > # Set XA transaction > xa=false > > # Connection pooling > pool=pooledjms > pool.maxConnections=256 > >
