I've switched from using the @PersistenceContext annotation to using seam 
managed persistence with @In(create = true) and now I'm getting behavior that 
doesn't make any sense to me.  I load a list of objects, outject them as a 
@DataModel then recieve the selected as a @DataModelSelection and try to delete 
it.  My assumption was that because the same entity manager is used throughout 
the conversation this wouldn't be a problem, but somehow I'm getting the 
following error

org.hibernate.NonUniqueObjectException: a different object with the same 
identifier value was already associated with the session: [model.wine.Wine#36]

I've looked at the debug output from 
org.jboss.seam.core.ManagedPersistenceContext which only shows one EM being 
created and never shows it being closed and I've added some debugging to my own 
app to prove that items are retrieved and deleted using the same EM, so how is 
this possible?  I'm sure I'm missing something and I'm really hoping someone 
with more experience than me with extended persistence can point me in the 
right direction.

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

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


_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to