Project

General

Profile

Sample-springds-hibernate » History » Revision 2

Revision 1 (Henning Blohm, 06.06.2013 12:41) → Revision 2/13 (Henning Blohm, 03.05.2014 18:37)

h1. A sample using Using Spring data sources and Spring transaction management in a modular application 

 This sample is very similar to [[Sample-spring-hibernate]] but differs in that we use 

 * Spring configured data sources 
 * A Spring transaction manager (in contrast to Atomikos as in [[Sample-jta-spring]] or the built-in TM as in [[Sample-spring-hibernate]]. 

 This is another practical application of [[How to Spring]]. 

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

 h2. Prerequisites 

 You need to run Java DB as network server on localhost. This is explained next. 

 The application will create a database "z2-samples" 

 {{include(How to run Java db)}} 

 h2. Run it 

 Like all samples, also this sample can Will be run as in [[How to run a sample]]. If you have the database, the fastest way to verify whether it runs is: 

 <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.springds-hibernate 

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

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

 When running, go to http://localhost:8080/springds-hibernate. You should see this: 

 !springds-hibernate.png! 
 coming real soon.