Project

General

Profile

How to Transaction Management » History » Version 11

Henning Blohm, 16.09.2012 16:59

1 10 Henning Blohm
h1. Transaction management in Z2
2 3 Henning Blohm
3 11 Henning Blohm
(work in progress)
4
5
Alternatives - mini JTA, full JTA.
6
Integration points: Jetty, Hibernate, Spring
7
8
Explain transaction util.
9
10
------------
11
12
13 3 Henning Blohm
This Wiki is about how to integrate a full-blown transaction manager into Z2. We only consider Atomikos for now, hoping other TMs can be used similarly.
14
15 4 Henning Blohm
Note that the z2-base.base repository contains the JTA 1.1 API and an implementation of it in the module *com.zfabrik.jta*. That is however not a real, full-featured transaction manager - rather just a pseudo-distributed transaction management implementation. There is no 2-phase-commit handling. 
16
17
It is still extremely useful for 90% case where global, distributed transactions are unnecessary overkill. 
18 3 Henning Blohm
19
At times however, you may require a real TM and even if you dont and want to use Atomikos with non-XA data sources, in which case it behaves similarly to *com.zfabrik.jta*, here is how it's done.
20
21
There are two samples related to this page:
22
23 8 Henning Blohm
* *z2-samples.jta-plain*: A sample scenario with just z2-base and Atomikos and no further trickery. This samples explains best what is needed to get going. See also [[Sample_jta_plain]].
24 7 Henning Blohm
* *z2-samples.jta-spring*: A sample scenario built on z2-base, z2-addons.spring, and Atomikos. This is the more advanced, Spring-minded case. The underlying mechanics may be harder to grasp though. See also [[samples_jta_spring]].
25 3 Henning Blohm
26
Please consult [[How_to_Run_a_Sample]] on how to run these samples.
27 6 Henning Blohm
28
h2. References
29
30
* [[How_to_Run_a_Sample]]
31
* [[How_to_Spring]]