Project

General

Profile

Bug #2077

com.zfabrik.db.data connections are not enlisted with JTA but workunit

Added by Henning Blohm over 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
z2-base
Target version:
Start date:
13.08.2020
Due date:
% Done:

100%

Estimated time:
origin:

Description

This leads to follow-up failures with Hibernate DDL isolation that sets connections to autocommit=true.

In this case, Hibernate (correctly) assumes that it is at liberty to set any connection to autocommit=true because it did not find any transaction to resume.

That however leads to an autocommit transaction in the workunit.

In addition, any connection that goes back into the pool should have autocommit reset to false.

Acceptance Criterias

  • Enlist connections with the Transaction rather than the workunit and so
    • A connection with enlist=jta, is only enlisted, if there is a transaction, and it is delisted when that transaction is delisted.
  • Refuse autocommit=true when in a transaction
  • Reset autocommit to false when returning a connection to the pool

Also available in: Atom PDF