users@glassfish.java.net

Re: GF V3 Embedded Container: Problem with JPA, Entity is not managed

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Fri, 12 Feb 2010 12:20:34 -0800

glassfish_at_javadesktop.org wrote:
> Thank you Marina. That solved the problem.
>
> So:
> * The find method returns a non-attached entity.
>

Yes, if the result is serialized-deserialized, or in a JTA em when
called outside an active transaction. But not in the same place where
the find was called.
> * The transaction context is only valid for methods inside of ejbs
>

No. You can manage your own transactions.
> Hey! Now I can run my JUnittests inside the glassfish container. That's great!
>

Now you can go back and do some reading ;).

Regards,
-marina

> [Message sent by forum member 'pepatpx' (prope_at_t-online.de)]
>
> http://forums.java.net/jive/thread.jspa?messageID=386312
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>