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? -mike On Thu, Oct 21, 2010 at 12:17 PM, kmansoor <[email protected]> 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: > http://openjpa.208410.n2.nabble.com/Connection-commit-is-not-allowed-during-a-global-transaction-tp5659512p5659512.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. >
