openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <>
Subject Re: OpenJPA without jta-data-source in persistence xml
Date Wed, 28 Apr 2010 20:46:03 GMT

I think Rick was suggesting that you use RESOURCE_LOCAL. Slice requires
multiple database configurations and I don't see any way for it to base them
on the jta-data-source element (based on the documentation anyway).

The catch is that the EM can't be container managed (this might depend on
how strict Glassfish is about enforcing that though).

You can use JTA transactions by adding these properties to persistence.xml
<property name="openjpa.TransactionMode" value="managed" />
<property name="openjpa.ConnectionFactoryMode" value="managed" />

I haven't tried them with slice, but it worked for 'non-slice' usage. You
will want to call em.joinTransaction() to participate in a bean managed
transaction though.


On Thu, Apr 22, 2010 at 2:10 AM, BenBrott <>wrote:

> So how are you configuring OpenJPA/Slice? Are you using RESOURCE_LOCAL? Are
> you using openjpa.ConnectionURL property instead of jta-data-source
> element?
> How do you manage transactions, with Spring (using Bean managed
> transactions
> beneath?) or container managed in EJB3? Are you using an  application
> server
> or in another environment?
> --
> View this message in context:
> Sent from the OpenJPA Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message