isolationLevel=TRANSACTION_NONE on dataSource config #3917
Labels
Epic
Used to track Feature Epics that are following the UFO process
FAT complete
This label is not part of the feature process and will be deleted. Use `target:ga` label instead.
focalApproved:accessibility
Focal Approval granted for Accessibility for the feature
focalApproved:fat
Focal Approval granted for FAT for the feature
focalApproved:id
Focal Approval granted for ID for the feature
story
target:18003
team:Zombie Apocalypse
Milestone
Statement of user story:
"As a user of database connectivity in Liberty, I would like the Liberty dataSource configuration to permit me to configure a default isolation level of TRANSACTION_NONE so that I can use a JDBC driver that does not support transactions while still taking advantage of value added capabilities such as connection pooling and statement caching."
Specifically, this will involve the introduction of an isolationLevel option, TRANSACTION_NONE. It might be necessary to internally use different constant value than the spec one for this because the spec one appears to have been abused for other purposes (means unspecified on resource ref).
When TRANSACTION_NONE is used as the isolation level for a connection, Liberty should not make any attempt to enlist the connection in global transactions, instead considering it similarly to transactional=false path. Should consider rejecting the setAutoCommit(false) operation in case the JDBC driver doesn't.
Tests should ensure that dataSource configured with isolationLevel=TRANSACTION_NONE can be used with or without a resource-ref, that it reports Connection.getTransactionIsolation() as Connection.TRANSACTION_NONE, and that operations made on the connection are not enlisted into a global transaction. For example, if the global transaction surrounding the code block rolls back, updates made using the TRANSACTION_NONE connection are not rolled back.
The text was updated successfully, but these errors were encountered: