[jboss-user] [EJB 3.0] - Transacation Problem

dkalna do-not-reply at jboss.com
Thu Nov 16 05:28:55 EST 2006


Hello, please help me, I do not know hot to do this. I have method A which has to load Test Entity (I use EJB3), update it and then proceed with oher method B. From the result of method B I have to update TEST entity again at the end of method A. I use Version column for concurrency. Here its with pseudo language:

public void A {

get entity TEST;
update one or more attributes on TEST entity;

call method B; // this method make updates to TEST Entity as well

once again, update attribute on TEST entity;
}

The problem is that at the end of method A I get OptimisticLockException.
How should I do this?

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

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



More information about the jboss-user mailing list