[jboss-user] [EJB/JBoss] - Re: Bean method called from within transaction cannot open c
branez
do-not-reply at jboss.com
Mon Jan 7 13:15:27 EST 2008
Problem solved. The error handling in this case could not be accomplished by catching EntityExistsException, since PersistenceExceptions except for NoResultException and NonUniqueException mark the transaction for rollback, causing it to be unavailable for the next iteration of addRootItem(). The existence check had to come first and, if it doesn't exist, Query.getSingleResult() throws NoResultException, which can then be handled properly because it does not cause a transaction rollback.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117653#4117653
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117653
More information about the jboss-user
mailing list