-
Jul 29th, 2012, 04:24 AM
#1
Some way to intercept @Transactional method call after commit?
Hi,
I know that @Transactional annotation is just a convenient way to construct TransactionProxyFactoryBean and other boilerplate configuration which allow for any type of customization, such as including custom interceptors, but I would like to keep using @Transactional *and* somehow specify somewhere in configuration to call my own interceptor so that I can do some stuff after transaction commits/rollbacks (outside of transaction).
Is that doable now?
regards,
Vjeran
-
Jul 29th, 2012, 04:59 AM
#2
Have a look at TransactionSynchonizationManager and the TransactionSynchrionization interface.
-
Jul 29th, 2012, 12:46 PM
#3
Simply execute your interceptor before the transactional one it is all about ordering and for that there is an order property on the tx:annotation-driven.
-
Aug 17th, 2012, 12:56 AM
#4
Sample implementation of proposed solution can be found here:
Spring database transactions before sending JMS
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