openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <>
Subject Re: Connection.commit is not allowed during a global transaction
Date Thu, 21 Oct 2010 20:16:20 GMT
Sorry to hear that you're having trouble.

Are you using resource injection to obtain the EntityManager or
EntityManagerFactory? If the container provided the JPA resource then it
should participate in a JTA transaction by default.

If you're using the javax.persistence.Persistence bootstrap class then the
default might be RESOURCE_LOCAL. In which case changing the setting in
persistence.xml will resolve the problem.

One other question, how have to specified the datasource(s)? Do you have a
jta-data-source, and a non-jta-data-source, or just one of them?


On Thu, Oct 21, 2010 at 12:17 PM, kmansoor <> wrote:

> Hi All-
> I'm getting an exception when trying to em.persist in a method with
> @TransactionAttributeType.REQUIRED, the method, of course is in EJB 3 SLSB.
> (RAD 7.5.0, WAS 6.1)
> The idea was to test participation in a global TX. The data sources points
> to Orable 10g and is an XA datasource.
> Since i'm not calling commit() anywhere in my (5 lines) code, i'm guessing
> openJPA is calling commit under covers, do i need to explicity warn openJPA
> it's in a container managed TX? some property? i already tried:
> <property name="openjpa.TransactionMode" value="managed" />”
> but didn't work, same exception.
> I'll appreciate any help.
> --
> View this message in context:
> Sent from the OpenJPA Users mailing list archive at

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