A correctness fix for JMS connection pooling: concurrently closing sessions of a pooled connection can no longer deadlock the pool, so a connection that fails asynchronously (for example an IBM MQ connection drop) is reliably detected and replaced.
Bug230921 JMS connection pool could deadlock when sessions are closed concurrently
| Severity: | 2 |
|---|---|
| Affected version(s): | 6.0.x |
Description
A pooled JMS connection no longer deadlocks when two threads concurrently close different sessions of the same connection, so the pool can reliably reclaim and replace that connection instead of leaving a pool thread stuck.
Technical details
Each JMS session proxy holds its own monitor while it closes, and the close path drove the connection's termination - closing the remaining sessions and announcing the connection as available to the pool - from inside that monitor. Two threads each closing a different session could therefore hold their own session monitor while reaching for the other's: a lock-ordering deadlock. The same path was also not atomic between deciding the connection was available and announcing it, so under the same race a connection that had already been handed back out could be announced available a second time and borrowed by two threads at once.
Termination is now single-shot per borrow: a guard taken under the connection's own monitor ensures at most one thread runs the session teardown and the availability announcement, while the announcement itself still runs outside the monitor. Concurrent close is therefore both deadlock-free and free of the double hand-out. The behaviour is always on; there is nothing to configure.
Changes impacting client API
None.
SBOM — runtime dependencies are minimalistic
Concerning security and vulnerabilities: the following are the runtime dependencies (the SBOM) of our product. As you can see, the only transitive third-party dependencies are for the Spring Boot integration modules — because that is the only way to integrate with Spring Boot. All other modules / jars have no third-party runtime dependencies whatsoever.
This is compile + runtime scope;provided, test and non-propagating
optional dependencies are excluded, so it is what your application
actually receives. Look up the module(s) your application depends on.
To reproduce it yourself, run this in a project that depends on the
Atomikos artifacts you use (use exactly this — not a bare dependency:tree,
which would also list optional/provided libraries you are not given):
mvn dependency:list -DincludeScope=runtime
Modules with no third-party runtime dependencies
ExtremeTransactionsForMaven ate atomikos-util axt extreme-transactions extreme-transactions-jakarta products spring-boot2 spring-boot3 spring-boot3.4 spring-boot4 subscription transactions transactions-allegrograph transactions-api transactions-eclipselink transactions-essentials transactions-essentials-jakarta transactions-hazelcast transactions-hibernate2 transactions-hibernate3 transactions-hibernate4 transactions-jdbc transactions-jms transactions-jmx transactions-jndi-provider transactions-jsp transactions-jta transactions-logcloud transactions-logutil transactions-micrometer transactions-monitoring transactions-monitoring-logs transactions-monitoring-stderr transactions-opentracing transactions-osgi transactions-osgi-axt transactions-remoting transactions-remoting-recovery transactions-spring transactions-spring-boot-logcloud transactions-tomcat
Per-module third-party runtime dependencies (opt-in, customer-chosen)
The dependencies below appear ONLY if you choose to use the corresponding integration module. They are the platform your application already runs — you added, say, the Spring Boot starter because you use Spring Boot. These are your own, customer-chosen dependencies: Atomikos does not inject anything into your infrastructure; you opt in by depending on the module.transactions-spring-boot org.springframework.boot:spring-boot:2.3.4.RELEASE org.springframework:spring-aop:5.2.9.RELEASE org.springframework:spring-beans:5.2.9.RELEASE org.springframework:spring-context:5.2.9.RELEASE org.springframework:spring-core:5.2.9.RELEASE org.springframework:spring-expression:5.2.9.RELEASE org.springframework:spring-jcl:5.2.9.RELEASE org.springframework:spring-tx:5.2.9.RELEASE transactions-spring-boot-starter org.springframework.boot:spring-boot:2.3.4.RELEASE org.springframework:spring-aop:5.2.9.RELEASE org.springframework:spring-beans:5.2.9.RELEASE org.springframework:spring-context:5.2.9.RELEASE org.springframework:spring-core:5.2.9.RELEASE org.springframework:spring-expression:5.2.9.RELEASE org.springframework:spring-jcl:5.2.9.RELEASE org.springframework:spring-tx:5.2.9.RELEASE transactions-spring-boot3 jakarta.jms:jakarta.jms-api:3.1.0 jakarta.transaction:jakarta.transaction-api:2.0.1 org.springframework.boot:spring-boot:3.0.1 org.springframework:spring-aop:6.0.3 org.springframework:spring-beans:6.0.3 org.springframework:spring-context:6.0.3 org.springframework:spring-core:6.0.3 org.springframework:spring-expression:6.0.3 org.springframework:spring-jcl:6.0.3 org.springframework:spring-tx:6.0.3 transactions-spring-boot3-starter jakarta.jms:jakarta.jms-api:3.1.0 jakarta.transaction:jakarta.transaction-api:2.0.1 org.springframework.boot:spring-boot:3.0.1 org.springframework:spring-aop:6.0.3 org.springframework:spring-beans:6.0.3 org.springframework:spring-context:6.0.3 org.springframework:spring-core:6.0.3 org.springframework:spring-expression:6.0.3 org.springframework:spring-jcl:6.0.3 org.springframework:spring-tx:6.0.3 transactions-spring-boot3.4 io.micrometer:micrometer-commons:1.12.0 io.micrometer:micrometer-observation:1.12.0 jakarta.jms:jakarta.jms-api:3.1.0 jakarta.transaction:jakarta.transaction-api:2.0.1 org.springframework.boot:spring-boot:3.2.0 org.springframework:spring-aop:6.1.1 org.springframework:spring-beans:6.1.1 org.springframework:spring-context:6.1.1 org.springframework:spring-core:6.1.1 org.springframework:spring-expression:6.1.1 org.springframework:spring-jcl:6.1.1 org.springframework:spring-tx:6.1.1 transactions-spring-boot3.4-starter io.micrometer:micrometer-commons:1.12.0 io.micrometer:micrometer-observation:1.12.0 jakarta.jms:jakarta.jms-api:3.1.0 jakarta.transaction:jakarta.transaction-api:2.0.1 org.springframework.boot:spring-boot:3.2.0 org.springframework:spring-aop:6.1.1 org.springframework:spring-beans:6.1.1 org.springframework:spring-context:6.1.1 org.springframework:spring-core:6.1.1 org.springframework:spring-expression:6.1.1 org.springframework:spring-jcl:6.1.1 org.springframework:spring-tx:6.1.1 transactions-spring-boot4 ch.qos.logback:logback-classic:1.5.21 ch.qos.logback:logback-core:1.5.21 com.zaxxer:HikariCP:7.0.2 commons-logging:commons-logging:1.3.5 io.micrometer:micrometer-commons:1.16.0 io.micrometer:micrometer-observation:1.16.0 jakarta.annotation:jakarta.annotation-api:3.0.0 jakarta.jms:jakarta.jms-api:3.1.0 jakarta.transaction:jakarta.transaction-api:2.0.1 org.apache.logging.log4j:log4j-api:2.25.2 org.apache.logging.log4j:log4j-to-slf4j:2.25.2 org.jspecify:jspecify:1.0.0 org.slf4j:jul-to-slf4j:2.0.17 org.slf4j:slf4j-api:2.0.17 org.springframework.boot:spring-boot-autoconfigure:4.0.0 org.springframework.boot:spring-boot-data-commons:4.0.0 org.springframework.boot:spring-boot-data-jdbc:4.0.0 org.springframework.boot:spring-boot-jdbc:4.0.0 org.springframework.boot:spring-boot-jms:4.0.0 org.springframework.boot:spring-boot-persistence:4.0.0 org.springframework.boot:spring-boot-sql:4.0.0 org.springframework.boot:spring-boot-starter-data-jdbc:4.0.0 org.springframework.boot:spring-boot-starter-jdbc:4.0.0 org.springframework.boot:spring-boot-starter-jms:4.0.0 org.springframework.boot:spring-boot-starter-logging:4.0.0 org.springframework.boot:spring-boot-starter:4.0.0 org.springframework.boot:spring-boot-transaction:4.0.0 org.springframework.boot:spring-boot:4.0.0 org.springframework.data:spring-data-commons:4.0.0 org.springframework.data:spring-data-jdbc:4.0.0 org.springframework.data:spring-data-relational:4.0.0 org.springframework:spring-aop:7.0.1 org.springframework:spring-beans:7.0.0 org.springframework:spring-context:7.0.1 org.springframework:spring-core:7.0.0 org.springframework:spring-expression:7.0.1 org.springframework:spring-jdbc:7.0.1 org.springframework:spring-jms:7.0.1 org.springframework:spring-messaging:7.0.1 org.springframework:spring-tx:7.0.0 org.yaml:snakeyaml:2.5 transactions-spring-boot4-starter ch.qos.logback:logback-classic:1.5.21 ch.qos.logback:logback-core:1.5.21 com.zaxxer:HikariCP:7.0.2 commons-logging:commons-logging:1.3.5 io.micrometer:micrometer-commons:1.16.0 io.micrometer:micrometer-observation:1.16.0 jakarta.annotation:jakarta.annotation-api:3.0.0 jakarta.jms:jakarta.jms-api:3.1.0 jakarta.transaction:jakarta.transaction-api:2.0.1 org.apache.logging.log4j:log4j-api:2.25.2 org.apache.logging.log4j:log4j-to-slf4j:2.25.2 org.jspecify:jspecify:1.0.0 org.slf4j:jul-to-slf4j:2.0.17 org.slf4j:slf4j-api:2.0.17 org.springframework.boot:spring-boot-autoconfigure:4.0.0 org.springframework.boot:spring-boot-data-commons:4.0.0 org.springframework.boot:spring-boot-data-jdbc:4.0.0 org.springframework.boot:spring-boot-jdbc:4.0.0 org.springframework.boot:spring-boot-jms:4.0.0 org.springframework.boot:spring-boot-persistence:4.0.0 org.springframework.boot:spring-boot-sql:4.0.0 org.springframework.boot:spring-boot-starter-data-jdbc:4.0.0 org.springframework.boot:spring-boot-starter-jdbc:4.0.0 org.springframework.boot:spring-boot-starter-jms:4.0.0 org.springframework.boot:spring-boot-starter-logging:4.0.0 org.springframework.boot:spring-boot-starter:4.0.0 org.springframework.boot:spring-boot-transaction:4.0.0 org.springframework.boot:spring-boot:4.0.0 org.springframework.data:spring-data-commons:4.0.0 org.springframework.data:spring-data-jdbc:4.0.0 org.springframework.data:spring-data-relational:4.0.0 org.springframework:spring-aop:7.0.1 org.springframework:spring-beans:7.0.0 org.springframework:spring-context:7.0.1 org.springframework:spring-core:7.0.0 org.springframework:spring-expression:7.0.1 org.springframework:spring-jdbc:7.0.1 org.springframework:spring-jms:7.0.1 org.springframework:spring-messaging:7.0.1 org.springframework:spring-tx:7.0.0 org.yaml:snakeyaml:2.5

Comments
Add a comment