Oracle® Containers for J2EE Orion CMP Developer's Guide
10g Release 3 (10.1.3) B19177-01 |
|
![]() Previous |
![]() Next |
You can configure one of the database isolation levels (see "Entity Bean Database Isolation Levels and Resource Contention") for a specific bean. That is, you can specify that when the bean starts a transaction, the database isolation level for this bean be what is specified in the OC4J-specific deployment descriptor (on parallel execution or data consistency).
Note: Once set, the isolation level for the bean is valid for the entire transaction. |
You can set the isolation level for each entity bean in the isolation
attribute of the <entity-deployment>
element (see Table A-1, "Attributes of the <entity-deployment> Element"). You can use committed
or serializable
value with committed
being the default. To change this default value to serializable
, configure the following in the orion-ejb-jar.xml
for the intended bean:
<entity-deployment ... isolation="serializable" ... </entity-deployment>
The serializable
isolation level provides data consistency; the committed
isolation level enables the parallel execution.
WARNING: Do not set the isolation level to |
WARNING: There is a danger of lost updates with the |
If you do not define an isolation level, you receive the level that is configured in the database. Setting the isolation level within the OC4J-specific deployment descriptor temporarily overrides the database configured isolation level for the life of the global transaction for this bean. That is, if you define the bean to use the serializable
level, then OC4J will force the database to be serializable
for this bean only until the end of the transaction.
You can specify both the entity bean concurrency mode and database isolation level, if the combination affects the outcome of your resource contention. See "Combining Entity Bean Database Isolation Level and Concurrency Mode" for more information.
For more information about resource contention, see "Avoiding Database Resource Contention".