users@glassfish.java.net

Re: Persistence Context in JPA

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Thu, 03 May 2007 20:04:02 +0530

Propagation of JTA transaction across session beans is independent of
use of JPA. Since you use different EMFs in those session beans, you
would be using different persistence contexts in each of those bean's
context. Did it answer your question? Take a look at [1] for an example
of PC propagation.

Thanks,
Sahoo
[1]
http://weblogs.java.net/blog/ss141213/archive/2006/10/persistence_con.html
glassfish_at_javadesktop.org wrote:
> As per JPA Spec section 5.6.3, "A single persistence context may correspond to one or more JTA entity manager instance (all associated with the same entity manager factory).
>
> Now, If I require a JTA transaction to be propagated among Stateful sesion beans and each session bean is using different datasources (hence having different persistence-units in same or different 'persistence.xml' file and hence different EMFs)
>
> How am I going to acheive this using JPA?
>
> With Regards,
> Mayank
> [Message sent by forum member 'mayankmishra' (mayankmishra)]
>
> http://forums.java.net/jive/thread.jspa?messageID=215218
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>