[jboss-user] [JBoss Seam] - Re: Help with StaleObjectStateException needed
davidfed
do-not-reply at jboss.com
Wed May 9 20:24:44 EDT 2007
I had almost exactly the same problem while trying to get a password changing UI working. It would work the first time and lose its optimism the second time.
I finally noticed while comparing against your code that I had:
entityManager.merge(currentUser);
instead of:
currentUser = entityManager.merge(currentUser);
With that change it started working and I started backing out all the other things I had tried to get it back to the simplest version.
I subsequently discovered that I needed:
@In @Out(scope=SESSION)
| private User currentUser;
to get the changes all the way back into the shared instance living in the session context. I did not previously know that @Out will not automatically outject back to the context @In injected from.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044546#4044546
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044546
More information about the jboss-user
mailing list