Announcement Announcement Module
Collapse
No announcement yet.
how to add throwAdvice interceptor to transactionProxyBean ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to add throwAdvice interceptor to transactionProxyBean ?

    Say, I have a service class that is proxied by transactionProxyBean. How can I add throwAdvice to proxied class after that w/o actually wrapping proxied class into ProxyBeanCreator in case when I have several Services to wrap.
    I tried to use BeanNameAutoProxyCreator to add interceptors but they don't work for transactionProxyBean: my exception interpector that implements ThrowsAdvice doesn't fire when exception thrown from service facade, however it worked for Dao's.

    I was trying to proxy Services that do not implement any interface, could be an issue ?

  • #2
    I found solution - as it was mention in http://forum.springframework.org/showthread.php?t=28992 all you need is to add throwAdvice to postInterceptors of TransactionProxyBean, so that it will fire after transaction rolledback and will allow to process exception thrown.

    Comment

    Working...
    X