[jboss-user] [JBoss Seam] - How to get rid of an object within a scope from within a ses

SmokingAPipe do-not-reply at jboss.com
Wed Aug 16 00:13:41 EDT 2006


Here's the problem: Like so many other applications, I have a page that lets users sign up.  Like all other Seam apps, I have a session bean that processes these signups.  If everything is ok, it calls entityManager.persist(user).

That's great.  Here's the problem: Let's say some silly user does that, and then goes back to that same page, and signs up again.  Not a normal use of the system, but it will happen and it shouldn't throw an error.  But it does throw an error, because it's using the same User object, which has already been persisted.  So it tries to persist a detached object, which is an error.

What's the solution to this?

Thanks


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

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



More information about the jboss-user mailing list