-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduced new "legacy" system to demonstrate how to configure multiple
data sources with Spring and JPA.
- Loading branch information
Matei1.Adrian
authored and
Matei1.Adrian
committed
Feb 24, 2014
1 parent
ce08c80
commit f37d52d
Showing
12 changed files
with
514 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
demo-restWS-spring-jersey-jpa2-hibernate | ||
======================================== | ||
Prerequisites: | ||
MySQL 5.5 or 5.6 | ||
Eclipse, JDK 1.7 | ||
-- | ||
- MySQL 5.5 or 5.6 | ||
- Eclipse | ||
- JDK 1.7 (if you want to use Jetty 9 with the jetty-maven-plugin from project) | ||
|
||
Install: | ||
Create DB - https://github.com/amacoder/demo-restWS-spring-jersey-jpa2-hibernate/blob/master/src/main/resources/input_data/DumpRESTdemoDB.sql | ||
Download the project | ||
Import in Eclipse | ||
Run Configuration -> Goals "clean install jetty:run" | ||
Install | ||
-- | ||
Create db schema by executing https://github.com/amacoder/demo-restWS-spring-jersey-jpa2-hibernate/blob/master/src/main/resources/input_data/DumpRESTdemoDB.sql against the MySQL database | ||
|
||
Visit http://www.codingpedia.org/ama/java-persistence-example-with-spring-jpa2-and-hibernate/ for the explanation of the code | ||
Run the example | ||
-- | ||
- Download/clone the project | ||
- Import in Eclipse | ||
- Run Configuration -> Goals "clean install jetty:run" | ||
|
||
Go to blog post | ||
-- | ||
Visit | ||
http://www.codingpedia.org/ama/java-persistence-example-with-spring-jpa2-and-hibernate/ | ||
for the explanation of the code |
Oops, something went wrong.
f37d52d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey,man.i hava a question.There are two transactionManager,so how can i use it in service?please contact me
f37d52d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The transaction managers are bound to the persistence context. See the class here for usage in code:
https://github.com/amacoder/demo-restWS-spring-jersey-jpa2-hibernate/blob/f37d52d88348eb125097a561e9105d61fffa08c3/src/main/java/org/codingpedia/demo/rest/dao/impl/PodcastDaoJPA2Impl.java
f37d52d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.