Project

General

Profile

Feature #885

Support more DataSource flags w.r.t JTA

Added by Henning Blohm over 12 years ago. Updated over 12 years ago.

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

0%

Estimated time:
origin:

Description

Currently, the default is the enlist in the work unit (and hence re-use along the workunit) or not at all.

Enlisting in the workunit "transparently" integrates with JTA. But sometimes this is not desired as the current behavior may create long-running transactions unintendedly (just some activity outside of a JTA tx).

It would hence be nice to support the following additional behaviors:

a) Require JTA transaction present ("JTA transaction required")

This is useful, if you really want to manage transaction demarcation and fail hard, if there is none.

b) Enlist in workunit if there is a JTA tx, otherwise return an autocommit connection ("JTA supported")

This is useful, if you are ok with non-TX stuff but still want to have control over TX demarcation.

Now a) has a downside: Some utilities (e.g. flyway, quartz) can be used with JNDI data sources but will not integrate with JTA.

For those exceptional cases, the data source lookup could be performed with a specialized marker interface (?type=...NonJTARequiringDatasource, ?type=JTAOptionalizingDatasource etc).

#1

Updated by Udo Offermann over 12 years ago

  • Category set to z2-base
#2

Updated by Henning Blohm over 12 years ago

  • Status changed from New to Rejected

As it turns out, supporting an arbitrary JTA impl with some specific pool is not really going to work well.

Instead: Use z2 jta as a simple pseudo-distributed JTA impl, switch completely to Atomikos or the like otherwise.

See als How_to_TransactionManager.

Also available in: Atom PDF