This content has been marked as final.
Show 4 replies
-
1. Re: JBoss Caching and multiple Entity Manager issues
genman Nov 8, 2007 5:34 PM (in response to vfpeter)This is probably an EJB3 question, as this exception should be expected in either case.
Make a copy of the object, using a copy-constructor or whatever, then persist the copy to the other entity manager. -
2. Re: JBoss Caching and multiple Entity Manager issues
vfpeter Nov 9, 2007 9:19 AM (in response to vfpeter)Thanks genman.
I cloned my object. But I still get the same exception.
Now if I made my entity non caching, then it works fine. This is the code I use to make my entities cacheable.@Cache (usage=CacheConcurrencyStrategy.TRANSACTIONAL)
-
3. Re: JBoss Caching and multiple Entity Manager issues
brian.stansberry Nov 9, 2007 9:26 AM (in response to vfpeter)I think you'll have better luck getting an answer on the Hibernate forums at hibernate.org. This seems to be more a question about how Hibernate deals with entities when a 2nd level cache is configured, rather than about the details of JBC.
-
4. Re: JBoss Caching and multiple Entity Manager issues
vfpeter Nov 9, 2007 9:51 AM (in response to vfpeter)Thanks Brian. I will try that.