[jboss-user] [EJB 3.0 Users] - Re: Default value for transaction-type in persistence.xml

jaikiran do-not-reply at jboss.com
Tue Dec 1 12:12:20 EST 2009


"longbeach" wrote : 
  | That is what this documentation for Apache Geronimo states :
  | http://cwiki.apache.org/GMOxDOC21/persistencexml.html
  | anonymous wrote : 
  |   | 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.
  | 
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268349#4268349

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268349



More information about the jboss-user mailing list