[jboss-user] [EJB 3.0] - Re: Transaction rolled back question

viniciuscarvalho do-not-reply at jboss.com
Fri Nov 16 11:14:19 EST 2007


"yilmaz_" wrote : if an excetion occurs container rollbacks automatically.
  | if you want to hold the state of transaction use UserTransaction 
  | and this is not a good idea to catch exceptions
  | anonymous wrote : try{...}
  |   | catch(SQLEXception e){
  |   | throw new RuntimeException(e);//softening the exception
  |   | }
  | can you publish dao.recordError(messageID); methods code.

Well, I've just solved it by changing my app exception to a checked exception. The dao actually throwed an app exception which was an unchecked exception so I could not have to deal with it on every call. 

I was really hopping the conteiner would invalidate the exception only if my last call threw it  :(

Can't see why my application exceptions can not be descendants of RuntimeExceptions ...

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

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



More information about the jboss-user mailing list