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
"antispart" wrote : I actually tried outjecting a List (instead of DataModel) to get around this issue but I found that while the list would be refreshed everytime I hit "search" (as it always did) it would still not be refreshed on subsequent page loads.
I suspect this was because although the context variable was being refereshed, the java variable in your SFSB wasn't null, so the @Factory wasn't being called. Did you have an @Out, or did you use @Factory("list", scope=ScopeType.EVENT)?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986450#3986450
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986450