This content has been marked as final.
Show 2 replies
-
1. Re: Default value for transaction-type in persistence.xml
jaikiran Dec 1, 2009 12:12 PM (in response to longbeach)"longbeach" wrote:
That is what this documentation for Apache Geronimo states :
http://cwiki.apache.org/GMOxDOC21/persistencexml.html
In general, in Java EE environments, a transaction-type of RESOURCE_LOCAL assumes that a non-JTA datasource will be provided. In a Java EE environment, if this element is not specified, the default is JTA. In a Java SE environment, if this element is not specified, a default of RESOURCE_LOCAL may be assumed.
That's actually what the EJB3 Persistence Spec states too:"EJB3 Persistence Spec" wrote:
6.2.1.2 transaction-type
The transaction-type attribute is used to specify whether the entity managers provided by the entity manager factory for the persistence unit must be JTA entity managers or resource-local entity managers. The value of this element is JTA or RESOURCE_LOCAL. A transaction-type of JTA assumes that a JTA data source will be provided either as specified by the jta-data-source element or provided by the container. In general, in Java EE environments, a transaction-type of RESOURCE_LOCAL assumes that a non-JTA datasource will be provided. In a Java EE environment, if this element is not specified, the default is JTA. In a Java SE environment, if this element is not specified, a default of RESOURCE_LOCAL may be assumed. -
2. Re: Default value for transaction-type in persistence.xml
longbeach Dec 1, 2009 12:17 PM (in response to longbeach)Thanks Jaikiran. That is what I read too a while ago. I guess I needed confirmation of that same behaviour in JBoss, which should be anyways, since it is JEE compliant.