Hi everybody,
I'm facing a problem with our JMS connection, when shutting down the karaf
container.
The JMS connectionFactory is provided/configured via ops4j-jms.
When shutting down karaf, I receive the message: "Caught exception trying
rollback() when putting session back into the pool, will invalidate.
javax.jms.IllegalStateException: The Session is closed".
Does anybody have an idea how to fix it?
Seaching for a workaround brings up to set the idleTimeout to 0, but this has
no effect.
The currently used versions are:
Karaf: 4.3.2
ActiveMq: 5.16.0
Camel: 3.7.4
Any help would be really appreciated.
Additional details are available below.
Thanks in advance,
Joerg
********************************************************************
Stacktrace
********************************************************************
2021-07-02T07:46:30,260 | WARN | Camel (gs-os-connector) thread #22 -
JmsConsumer[AMQ.GSLISA.OS.BUFFERED-SPX] | JmsPoolSession |
213 - org.messaginghub.pooled.jms - 1.2.1 | Caught exception trying rollback()
when putting session back into the pool, will invalidate.
javax.jms.IllegalStateException: The Session is closed
javax.jms.IllegalStateException: The Session is closed
at
org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:772) ~[?:?]
at
org.apache.activemq.ActiveMQSession.rollback(ActiveMQSession.java:597) ~[?:?]
at
org.messaginghub.pooled.jms.JmsPoolSession.close(JmsPoolSession.java:112) [!/:?]
at
org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:109) [!/:?]
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1289)
[!/:?]
at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1135)
[!/:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[?:?]
at java.lang.Thread.run(Unknown Source) [?:?]
********************************************************************
Feature config
********************************************************************
<feature name="gs-lisa-activemq" version="${project.version}"
description="Provide JMS connection factory and ActiveMqBroker" >
<feature>jms</feature>
<feature version="[4,5)">spring</feature>
<feature version="${activemq.version}">activemq-broker-noweb</feature>
<feature version="${activemq.version}">activemq-client</feature>
<feature version="${ops4j.pax.jms.version}">pax-jms-pool-pooledjms</feature>
<feature version="${ops4j.pax.jms.version}">pax-jms-activemq</feature>
<feature version="${camel.version}">camel-jms</feature>
<config name="org.ops4j.connectionfactory-lisa-amq">
name = lisa-amq
osgi.jndi.service.name = jms/lisa-amq
password = ${activemq.jms.password}
connectionFactoryType = ConnectionFactory
type = activemq
url = ${activemq.url}
user = ${activemq.jms.user}
# hints for pax-jms-config to use selected
org.ops4j.pax.jms.service.PooledConnectionFactoryFactory
pool = pooledjms
xa = false
# pooled-jms specific configuration of
org.messaginghub.pooled.jms.JmsPoolConnectionFactory
pool.idleTimeout = 10
pool.maxConnections = 10
pool.blockIfSessionPoolIsFull = true
pax.jms.managed = true
</config>
</feature>