Maybe my approach needs to be altered, but how do I cancel a rollback in EJB3? 

My situation is that I have one session bean method that is wrapped in a 
transaction. This method makes two calls to the database. The first call is to 
see is a records exists. The second inserts a new record if the first call 
comes up empty. The problem is that when I check to see if the entity exists, I 
get an EntityNotFoundException. That's fine. That's what I expect. The problem 
is that this exception rolls back the entire transaction so that I cannot make 
the subsequent insert. This happens no matter how I try to catch the exceptions.

These two operations must execute atomically. So, is there anyway to ignore an 
exception like this or cancel the rollback?

Thanks
T

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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to