Results 1 to 2 of 2

Thread: Writing an interceptor/aop advice to convert DataAccessException

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Posts
    90

    Default Writing an interceptor/aop advice to convert DataAccessException

    I am looking for advice/example on how to solve this suggestion I received on my data access posting to convert a thrown DataAccessException into your own Exceptions using <aop:config/>..after-thowing?

    Quote Originally Posted by mdeinum View Post
    .... write a interceptor/aop advice which converts the DataAccessExceptions into your own Exceptions.
    Can declarative Spring AOP handle this? I won't start implementing aspectJ for another month.

    thank you!

  2. #2
    Join Date
    Feb 2005
    Location
    Boston, MA
    Posts
    1,142

    Default

    Take a look at the example in this talk: Using AOP in the Enterprise.

    The short of it is, the DAO has a after-throwing interceptor to convert the exception from Hibernate to DataAccessException, similar to what you want.
    Bill

Posting Permissions

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