0 Replies Latest reply on Nov 2, 2008 4:17 AM by Mohammad Norouzi

    question about exception and rollback

    Mohammad Norouzi Novice

      Hello

      Each application exception will cause the transaction to be rolled back but what if we set an interceptor say ExceptionInterceptor to catch all the exception and set the error codes and messages to outgoing DTOs.

      Because our DTO classes have a super class in which a response object is featured so any exception in ExceptionInterceptor can be transated into our standard format. As I understand because we catch the exception and set the required values to response and the method proceeds normally no rollback occurrs.

      We are using container managed transactions so how we can mark the transaction to be rolled back?

      thanks