Access intent for Entities 2.x. is the replacement in the
specification for the EJB 1.x access intents and EJB 1.x isolation
levels.
About this task
There are two general methods for adding access intent
to enterprise beans 2.x:
- Bean-level access intent (Default): this default method
for handling access intent based on the bean-level should be used
in most cases.
- Method-level access intent: this advanced method for handling
access intent based on methods should only be used in advanced situations.
Procedure
- Switch to the Java™ EE
perspective.
- In the Enterprise Explorer view, expand your EJB 2.x project
and double-click the Deployment Descriptor node.
- On the Access page of the EJB deployment
descriptor editor, under the Access Intent for Entities
2.x (Method Level Deprecated) section, click Add.
- In the Name field of the Add
Access Intent wizard, type a name for the new access intent.
- In the Access intent name field,
select an access intent type from the list. For
details on these access intent types, see the table in the Access intent assembly settings topic available
from the WebSphere® Application
Server product documentation.
- Type a description for the new access intent.
- If you select one of the following access intent names,
you can also select the Read Ahead Hint check
box. This option adds the ability to preload related enterprise beans
across relationships in a single query.
- wsPessimisticUpdate-WeakestLockAtLoad
- wsPessimisticUpdate
- wsPessimisticUpdate-NoCollision
- wsPessimisticUpdate-Exclusive
- wsPessimisticRead
- wsOptimisticUpdate
- wsOptimisticRead
- To set the persistence, click Persistence Option.
- Verify Read Only Data: Select one of NONE,
AT_TRAN_BEGIN, or AT_TRAN_END.
- Deferred Operation: Select one of NONE,
CREATE_ONLY, or ALL.
- Batch: This operation uses the JDBC
batch command to insert, update, or delete rows in the database back
end that this particular enterprise bean is connected to.
- In the Deferred Operation section,
select ALL. (You must select All to use the
batch option.)
- Check the Batch check box.
- Click Next.
- On the Enterprise Bean Selection page,
select one or more enterprise beans from the list of beans found,
then click Next. If you selected Read
Ahead Hint, you get a warning if no read ahead hint can
be set for the selected bean. You might need to go back and clear
the Read Ahead Hint check box.
- On the Method Elements page, select
one or more of the method elements for the security identity. If you
selected Read Ahead Hint, then Next is
enabled. On the EJB Preload Paths page, set the preload of related
EJBs by selecting the relationship roles by the selected bean.
- Click Finish.
Results
The access intent is added. To remove the access intent, select
it and click the
Remove button.