Results 1 to 2 of 2

Thread: how to add throwAdvice interceptor to transactionProxyBean ?

  1. #1

    Default 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. #2

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •