ObjectDB ObjectDB

setIsolationLevel(level) - JDO Transaction's method

Method
javax.jdo.Transaction
void setIsolationLevel(
  String level
)

Set the value for transaction isolation level for this transaction. Transaction isolation levels are defined in javax.jdo.Constants. If the requested level is not available, but a higher level is available, the higher level is silently used. If the requested level is not available, and no higher level is available, then JDOUnsupportedOptionException is thrown. Five standard isolation levels are defined. Other isolation levels might be supported by an implementation but are not standard.

Standard values in order of low to high are:

  • read-uncommitted
  • read-committed
  • repeatable-read
  • snapshot
  • serializable
Parameters:
level - the transaction isolation level
Since:
JDO 2.2
See Also:
getIsolationLevel()
Constants.TX_READ_UNCOMMITTED
Constants.TX_READ_COMMITTED
Constants.TX_REPEATABLE_READ
Constants.TX_SNAPSHOT
Constants.TX_SERIALIZABLE