Sample-springds-hibernate » History » Version 2
Henning Blohm, 03.05.2014 18:37
1 | 2 | Henning Blohm | h1. A sample using Spring data sources and Spring transaction management in a modular application |
---|---|---|---|
2 | 1 | Henning Blohm | |
3 | 2 | Henning Blohm | This sample is very similar to [[Sample-spring-hibernate]] but differs in that we use |
4 | |||
5 | * Spring configured data sources |
||
6 | * A Spring transaction manager (in contrast to Atomikos as in [[Sample-jta-spring]] or the built-in TM as in [[Sample-spring-hibernate]]. |
||
7 | |||
8 | This is another practical application of [[How to Spring]]. |
||
9 | |||
10 | This sample is stored in "z2-samples.springds-hibernate":http://redmine.z2-environment.net/projects/z2-samples/repository/z2-samples-springds-hibernate. |
||
11 | |||
12 | h2. Prerequisites |
||
13 | |||
14 | You need to run Java DB as network server on localhost. This is explained next. |
||
15 | |||
16 | The application will create a database "z2-samples" |
||
17 | |||
18 | {{include(How to run Java db)}} |
||
19 | |||
20 | h2. Run it |
||
21 | |||
22 | Like all samples, also this sample can be run as in [[How to run a sample]]. If you have the database, the fastest way to verify whether it runs is: |
||
23 | |||
24 | <pre><code class="ruby"> |
||
25 | mkdir install |
||
26 | cd install |
||
27 | git clone -b master http://git.z2-environment.net/z2-base.core |
||
28 | git clone -b master http://git.z2-environment.net/z2-samples.springds-hibernate |
||
29 | |||
30 | # on Linux / Mac OS: |
||
31 | cd z2-base.core/run/bin |
||
32 | ./gui.sh |
||
33 | |||
34 | # on Windows: |
||
35 | cd z2-base.core\run\bin |
||
36 | gui.bat |
||
37 | </code></pre> |
||
38 | |||
39 | When running, go to http://localhost:8080/springds-hibernate. You should see this: |
||
40 | |||
41 | !springds-hibernate.png! |