Announcement Announcement Module
Collapse
No announcement yet.
TransactionManager per DAO? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #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.

    Comment


    • #3
      Thanks, Marten for your reply, I think I've moved a bit closer to the understanding of how this must be designed.

      Comment

      Working...
      X