[jboss-user] [EJB 3.0] - question about exception and rollback

mnrz do-not-reply at jboss.com
Sun Nov 2 04:17:49 EST 2008


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186216#4186216

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186216



More information about the jboss-user mailing list