-
Mar 10th, 2009, 12:42 PM
#1
TransactionManager per DAO?
I have several DAOs which all work with the same data resource (particularly, JCR), and some of them are even more specific, i.e., work only within the same node subtree.
The question is, what is the best practice regarding TransactionManager-s configuration (by now I'm just using spring-modules-jcr LocalTransactionManager)?
Specifically, should I have one transactionManager for each DAO, one transactionManager for all the DAOs that operate on the same data, or a separate transactionManagers for each DAO regardless of what data the DAO is accessing?
-
Mar 10th, 2009, 04:08 PM
#2
Neither of your solutions...
Transactions should be defined on your service layer not your dao layer. Also you only need 1 transactionmanager.
I suggest you read chapter 9 of the reference guide which explains all about transactions.
-
Mar 10th, 2009, 05:52 PM
#3
Thanks, Marten for your reply, I think I've moved a bit closer to the understanding of how this must be designed.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules