OpenJPA typically retains the default transaction isolation level of the JDBC
driver. However, you can specify a transaction isolation level to use through
openjpa.jdbc.TransactionIsolation configuration property. The
following is a list of standard isolation levels. Note that not all databases
support all isolation levels.
default: Use the JDBC driver's default isolation level.
OpenJPA uses this option if you do not explicitly specify any other.
none: No transaction isolation.
read-committed: Dirty reads are prevented; non-repeatable
reads and phantom reads can occur.
read-uncommitted: Dirty reads, non-repeatable reads and
phantom reads can occur.
repeatable-read: Dirty reads and non-repeatable reads are
prevented; phantom reads can occur.
serializable: Dirty reads, non-repeatable reads, and phantom
reads are prevented.
Example 4.8. Specifying a Transaction Isolation
<property name="openjpa.jdbc.TransactionIsolation" value="repeatable-read"/>