Announcement Announcement Module
Collapse
No announcement yet.
Transaction within transaction Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Transaction within transaction

    Hi,

    Is it possible to have a transaction (handled by the PlatformTransactionmanager) within a CMT?

    Ie mdb started, calls method in pojo, starts new tx,does stuff, commits that transaction, returns and finishes other things in CMT?

    The transactions must be independant, ie tx 1 will start, tx2 will start, tx2 can commit or rollback without affecting tx1. tx1 will then commit.

    Regards,
    Andrew

  • #2
    you can do it using REQUIRES_NEW transaction propagation.

    Comment


    • #3
      Mixing transaction management styles

      I think Andy knows about the "requires new" transaction semantics; I think he's asking whether it's OK to mix transaction declaration styles, i.e. have some of your transactional behaviour defined using classic CMT and the rest defined using Spring's PlatformTransactionManager API (as per the reference guide, e.g. via @Transactional annotations and so on).

      I certainly hope this approach is OK, because I'm using it on a live app!

      Comment

      Working...
      X