[jboss-user] [EJB/JBoss] - Re: Bean method called from within transaction cannot open c
jaikiran
do-not-reply at jboss.com
Sat Dec 29 06:21:48 EST 2007
Does merge actually throw a EntityExistsException? The javadoc does not mention this. Or is this code, that you posted, just for outlining the behaviour?
anonymous wrote : EntityExistsException does not cause a rollback and even if it did, find() would start its own transaction, would it not?
I would believe that the transaction would not be rolled back(or set to INACTIVE state) when the exception occurs within the bean. However calling the find method from within the catch block is not going to create a transaction. If you have to start a transaction when the find method is called then you will have to get access to the ejb object in the catch block and then call the find method on it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116022#4116022
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116022
More information about the jboss-user
mailing list