persistence@glassfish.java.net

Re: Cannot see newly created object

From: Markus KARG <markus.karg_at_gmx.net>
Date: Wed, 02 Jul 2008 19:41:59 +0200

Marina,
>>> Can it be that you are accessing a detached reference when you are
>>> accessing it the 2nd time? If EM is transactional, and it's
>>> container-managed (i.e. injected or looked up directly, not through
>>> EMF), all instances become detached after commit.
>> I thought so, too. But why not getting an Exception when doing
>> em.refresh(myEntity)? Is it allowed to refresh a detached entity?
> It should. Can you call em.contains() to check what does em think?
I'll try ASAP and let you know.

Have Fun
Markus

-- 
http://www.xing.com/go/invita/58469