Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] COMMIT is not allowed in a subordinate session

As Michael has mentioned, you'll need RESOURCE_LOCAL to create the data bases. If you need JTA you could still can create tables without JTA, then open a new factory that would use JTA and the created tables:

Remove dll-generation properties from persistence.xml (btw eclipselink.jdbc.exclusive-connection.mode=Transactional property is irrelevant: it has nothing to do with JTA, but indicates that connection is exclusive for the duration of transactiion. Transactional is default value for that property, therefore the property may be skipped).

// factory1 used only to create tables - uses non-jta data source
// where props include the dll-generation props + javax.persistence.transactionType -> RESOURCE_LOCAL and javax.persistence.nonJtaDataSource -> myNonJtaDataSource)
EMF factory1 = createEMF(props);
...
factory1.close();

// factory2 to be used by the app, uses JTA
EMF factory2 = createEMF();

----- Original Message ----- From: "depstei2" <depstei2@xxxxxxx>
To: <eclipselink-users@xxxxxxxxxxx>
Sent: Monday, April 13, 2009 9:42 AM
Subject: RE: [eclipselink-users] COMMIT is not allowed in a subordinate session



We need JTA for our application, I guess we will stick to using hibernate or
openjpa as these work fine with oracle.
I tried removing the
eclipselink.jdbc.exclusive-connection.mode=Transactional property, but It
still gives the same error.

Thanks for responding,
Daniel

--
View this message in context: http://www.nabble.com/COMMIT-is-not-allowed-in-a-subordinate-session-tp22992922p23022518.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users




Back to the top