JPA - Transaction

> JPA - Java Persistence API (JPA)

2 - Operation

2.1 - Begin

2.2 - Commit

The managed entities of:


2.3 - Rollback

For both transaction-scoped and extended persistence contexts, transaction rollback causes all pre-existing managed instances and removed instances to become detached.

The instances’state will be the state of the instances at the point at which the transaction was rolled back.

Transaction rollback typically causes the persistence context to be in an inconsistent state at the point of rollback. In particular, the state of version attributes and generated state (e.g., generated primary keys) may be inconsistent.

Instances that were formerly managed by the persistence context (including new instances that were made persistent in that transaction) may therefore not be reusable in the same manner as other detached objects—for example, they may fail when passed to the merge operation.

jpa/transaction.txt · Last modified: 2014/01/25 08:29 by gerardnico