I've seen  a TransactionRequiredException error occur on persist() when no
transaction is active, for an extended persistence context. jsr220 states,
in 3.1.1:

/*
 * @throws TransactionRequiredException if invoked on a
 * container-managed entity manager of type
 * PersistenceContextType.TRANSACTION and there is
 * no transaction 
*/

In 3.3 it states:
When an EntityManager with an extended persistence context is used, the
persist, remove, merge, and
refresh operations may be called regardless of whether a transaction is
active. 

However, in the OpenJPA documention at
http://openjpa.apache.org/builds/apache-openjpa-1.2.3-SNAPSHOT/docs/manual/manual.html#jpa_overview_em_trans


it states:

This action  [persist] can only be used in the context of an active
transaction.

without any qualification as to the persistenceContextType of the entity
manager.

Is OpenJPA in compliance with the spec here?


--
View this message in context: 
http://openjpa.208410.n2.nabble.com/TransactionRequiredException-on-persist-on-extended-EM-tp6972526p6972526.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to