Skip Headers

# Serializable Read Levels

Previous

Next

To achieve serializable transaction isolation with TopLink, Oracle recommends that you use an isolated client session (see "Isolated Client Sessions") as follows:

1. Configure the database transaction isolation as serializable.

2. Configure objects as isolated (see "Configuring Cache Isolation at the Project Level" or "Configuring Cache Isolation at the Descriptor Level").

3. Use the `UnitOfWork` method `beginTransactionEarly` (see "Unit of Work Method beginTransactionEarly").

If you are only concerned about the write aspect of serializable, optimistic locking is sufficient.

To prevent phantom read transactions (that is, when a transaction detects that new records that have been added to the database after the transaction started), use the `ReadQuery` method `cacheQueryResults`.