Feature190375
Allow recycling of active connections within the same transaction

You can now allow recycling of active JDBC/XA pooled connections within the same transaction, before they are "closed" by the application. This means that certain deadlock scenarios can be avoided.

Technical details

Imagine the following use case:

  1. start a JTA transaction
  2. get a JDBC/XA connection (c1) from the pool via getConnection()
  3. do some SQL on c1
  4. get a second JDBC/XA connection (c2) from the pool via getConnection()

Before this feature, step 4 would return a different physical connection from the pool. This would trigger a new XA branch, with unspecified isolation (locking) behaviour with respect to any updates performed via the connection in step 2. This could even cause deadlocks.

Therefore, people have asked us to allow for step 4 to reuse the same connection, c1. You can now enable this new behaviour by calling setRecycleActiveConnectionsInTransaction(true) on the AtomikosDataSourceBean.

Changes impacting client API

A new, optional setter on our datasource. The default is false for backward compatibility.

About Severity

The severity levels we use are defined in our support terms and conditions.

Available to customers only. Want to become a customer?

Free Trial

Corporate Information

Atomikos Corporate Headquarters
Hoveniersstraat, 39/1, 2800
Mechelen, Belgium

Contact Us

Copyright 2024 Atomikos BVBA | Our Privacy Policy
By using this site you agree to our cookies. More info. That's Fine