Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.3.3
-
Fix Version/s: 2.0.0
-
Labels:None
-
Environment:Only Informix can be affected AFAIK
-
Number of attachments :
Description
When properly configured, Informix do support TX interleaving meaning 'deferConnectionRelease' can be disabled. Unfortunately the XA pool's handling of TX interleaving has been broken between releases 1.3.2 and 1.3.3.
This needs to be fixed for next release.
Issue Links
- is depended upon by
-
BTM-68
BitronixTransactionManager.resume() gradually slower when called very often
-
Quite a serious change need to happen with the AbstractXAResourceHolder at its core. Some internal design mistake has been made when this class has been implemented which caused
BTM-33. The committed fix does work but is awkward (it just patches around the design mistake) and caused this bug.The attached patch is a design cleanup of the XAResourceHolder, its abstract implementation (AbstractXAResourceHolder) all all impacted code.
The basic idea is that since a XAResourceHolder can potentially be involved in multiple transactions in parallel (be it using TX interleaving or by TX suspension) it needs to keep track of its transactions as soon as it gets enlisted in a new one. The current code keeps a list of all running transactions with the latest reported one marked with special 'privileges': the current one. This works fine in a sequential TX handling mode (when only a single TX can be active at any time) but fails for the case where multiple TX have to run in parallel. The new code will simply use a map of transaction states with the transactions' GTRIDs as keys: simple, elegant, robust and helps pruning some of the TM's most complex code.