-
Bug
-
Resolution: Invalid
-
High
-
None
-
4.4, 5.0
-
None
-
4.04
-
storeAll is designed to be transactional, as you may be storing more than 1 entity. However there is a bug in that if the list contains only a single entity no transaction is ever started, in these cases the transaction is only committed on the close of the connection, which only happens when the finalizer is called, as the close takes place in the explicit committ. This is causing the linked issue failure.
This is the code from GenericDelegator
boolean beganTransaction = false; int numberChanged = 0; try { // if there are multiple helpers and no transaction is active, begin one if (valuesPerHelper.size() > 1) { beganTransaction = TransactionUtil.begin(); } ..snip TransactionUtil.commit(beganTransaction);
in TransactionUtil.commit, you simply noop if beganTransaction is false (which it will be for single entities)
- causes
-
JRASERVER-26172 Creating an issue from a transition can lock the database under load.
- Closed