users@glassfish.java.net

Re: Persistence Context in JPA

From: <glassfish_at_javadesktop.org>
Date: Fri, 04 May 2007 03:39:35 PDT

> Don't apply the above rule in isolation. Apply it in
> conjunction with
> rule #4, which says "A PC is propagated when the
> called component uses
> EM that belongs to the *same Entity Manager Factory*
> as the caller."
> You can try a simple example to see it yourself. Also
> look at the
> GlassFish error message shown below. It contains the
> phrase "same
> EntityManagerFactory".
> /javax.ejb.EJBException: There is an active
> transactional persistence
> context for the same EntityManagerFactory as the
> current stateful
> session bean's extended persistence context.
>
> Sahoo


Hi Sahoo,

:) Phew! I already agree with all PC Propagation rules and also all rules required to be met and a few others too. Also agree that extended PC can't have different EMF.

Thanks a lot for replies dear. I Appreciate your help.

With Regards,
Mayank
[Message sent by forum member 'mayankmishra' (mayankmishra)]

http://forums.java.net/jive/thread.jspa?messageID=215499