[jboss-user] [EJB/JBoss] - Merging an object twice

hamtho2 do-not-reply at jboss.com
Wed Feb 4 17:33:55 EST 2009


Hi,

I´ve got a strange behaviour:
If I call entityManager.merge(object) twice I get a OptimisticLockingException or alternatively an EntityExistsException using the embedded JBoss for test purposes.

Is this the correct behaviour? As far as I knew, I could call merge() multiple time and the underlying implementation decides what to do. For a newly created entity call persist, otherwise re-manage the object or update it´s values. But there is not reason why calling merge multiple times causes an Exception. Or am I wrong?

Did I misunderstood anything or is this a strange bug in the strange embedded jboss.

Thanks
Thomas

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

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




More information about the jboss-user mailing list