You can use the deployment descriptor editor to add an isolation
level to a CMP entity bean 1.x.
To add an isolation level to an a CMP entity bean 1.x with container-managed
persistence:
- Switch to the J2EE perspective.
- In the Project Explorer view, select the desired EJB module.
- Right-click on the Deployment Descriptor Editor and
select Open With from the pop-up menu.
- On the Access page of the editor, scroll
to the Isolation level section.
- Click Add. The Add Isolation Level wizard
appears.
- Select a type of isolation level from the following choices:
- Repeatable read: This isolation level prohibits
dirty reads and nonrepeatable reads, but it allows phantom reads.
- Read committed: This isolation level prohibits
dirty reads, but allows nonrepeatable reads and phantom reads.
- Read uncommitted: This isolation level allows
reading uncommitted changes (data changed by a different transaction that
is still in progress). It also allows dirty reads, nonrepeatable reads, and
phantom reads.
- Serializable: This isolation level prohibits
the following types of reads: 1) Dirty reads, in which a transaction
reads a database row containing uncommitted changes from a second transaction,
2) Nonrepeatable reads, in which one transaction reads a row, a second
transaction changes the same row, and the first transaction rereads the row
and gets a different value, and 3) Phantom reads, in which one transaction
reads all rows that satisfy an SQL WHERE condition, a second transaction inserts
a row that also satisfies the WHERE condition, and the first transaction applies
the same WHERE condition and gets the row inserted by the second transaction.
- Click Next.
- Select one or more enterprise beans from the list of beans found,
then click Next. The enterprise beans selected here
are the ones whose methods you want to assign to the isolation level.
- Select one or more of the method elements from the list.
- Click Finish.
The isolation level is added. To remove the isolation level, select
it and click the Remove button.