Atomikos Forum

The underlying XA session is closed

Hi! I am using Atomikos in a web application based on Spring and Hibernate. Recently we upgraded our Spring and Hibernate versions to Spring 4 and Hibernate 4. We're also using Spring JDBC template for some queries. We use connection sharing between JDBC and Hibernate (solution described by assaf27 on this Spring forum thread: We need this because we set a security context on each session via JDBC, and we want the same security context to apply in Hibernate queries.

Since the upgrade, we're experiencing the following problem, see exception stacktrace:
The problem appears and disappears ... it's unpredictable.

We're using Atomikos 3.9.3. The moment when the problem manifests, is when we're fetching data via JDBC and Hibernate parallel via multiple threads (using the Spring @Async annotation...)

I would be very pleased if somewone could assist me in finding a solution to this problem. I tried to find a clue by debugging through Atomikos and Spring code, but at a certain point it gets too abstract for me.
Jeroen Verheye Send private email
Friday, June 26, 2015

I don't know the charming inner workings of the Spring @Async annotation, but in general it is not a good idea to have multiple threads share a same JTA transaction.

Guy Pardon Send private email
Friday, July 03, 2015

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics