Announcement Announcement Module
Collapse
No announcement yet.
Spring transaction rollback aop config Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring transaction rollback aop config

    Hi, I have a question regarding rolling back Spring transactions using aop definitions.

    Code:
    <tx:advice id="txAdvice" transaction-manager="transactionManager">  
        <tx:attributes>  
            <tx:method name="save*" />  
        </tx:attributes>  
    </tx:advice>
    If I call service.save(), and save() throws a RuntimeException then everything works fine - the transaction is successfully rolled back.

    However if I call service.test(), and all test() does is call save(), then the transaction never gets rolled back.

    It's almost like Spring's TransactionInterceptor doesn't fire unless you call service.save() directly.

    Thoughts?

  • #2
    That is a self-call example.

    Comment


    • #3
      Thanks....

      Comment

      Working...
      X