Project

General

Profile

Sample-jta-plain » History » Revision 2

Revision 1 (Henning Blohm, 11.09.2012 09:29) → Revision 2/25 (Henning Blohm, 15.09.2012 10:37)

h1. Using z2 with a Transaction Manager 

 (Work in progress) 

 This sample demonstrates how to use Z2 with the Atomikos transaction manager.  

 There is another sample that shows how to use Z2 with a Spring configured transaction manager. See [[sample-jta-spring]]. In contrast to that, this sample is less sophisticated but probably better suited to understand the underlying mechanics. 

 The Wiki page [[How_to_TransactionManager]] explains the general principles behind transaction handling in Z2. 

 This sample is stored in "z2-samples.jta-plain":http://redmine.z2-environment.net/projects/z2-samples/repository/z2-samples-jta-plain. 

 h2. Pre-Requisites 

 This sample assumes the presence of a MySQL database system on localhost with a database called "z_tx_tests" for which a user "tx" with password "tx" has full permissions. If you have a running MySQL server these SQL commands do the trick: 

 <pre><code class="SQL"> 
 create database z_tx_tests; 
 grant all on z_tx_tests.* to tx@localhost identified by 'tx'; 
 </code></pre> 

 h2. Running the sample 

 This sample is run as explained in [[How to run a sample]]. The 5 minutes version: 

 <pre><code class="ruby"> 
 mkdir install 
 cd install  
 git clone -b master http://git.z2-environment.net/z2-base.core 
 git clone -b master http://git.z2-environment.net/z2-samples.jta-plain 

 # on Linux / Mac OS: 
 cd z2-base.core/run/bin 
 ./gui.sh 

 # on Windows: 
 cd z2-base.core\run\bin 
 gui.bat 
 </code></pre>