Access intent -- isolation levels and update locks

 

The combination of concurrency and access type determines the isolation level for the persistence manager. The actual isolation level depends upon the particular database, as shown in the following table.


Isolation level
AccessIntent profile DB2 Oracle1 SyBase Informix Cloudscape SQL Server For Update
wsPessimisticUpdate-Weakest LockAtLoad (Default policy) RR RC RR RR RR RR No2
wsPessimisticUpdate RR RC RR RR RR RR Yes
wsPessimisticRead RR RC RR RR RR RR No
wsOptimisticUpdate RC RC RC RC RC RC No
wsOptimisticRead RC RC RC RC RC RC No
wsPessimisticUpdateNo-Collisions RC RC RC RC RC RC No
wsPessimisticUpdate- Exclusive S S S S S S Yes

Isolation levels:

RC JDBC Read committed
RR JDBC Repeatable read
S JDBC Serializable

1 Oracle does not support JDBC Repeatable

2 Yes for Oracle

Both wsPessimisticUpdate-weakestLockAtLoad and wsPessimisticUpdate behave the same way on Oracle as do wsPessismisticRead and wsOptimisticRead. Because of an Oracle restriction, the OracleXADataSource JDBC class cannot run with an S transaction isolation level. So you cannot use this class to run an application containing enterprise beans whose access intent policies are configured to cause the bean to load with RR isolation.