Access intent assembly settings

Access intent policies contain data-access settings for use by the persistence manager. Default access intent policies are configured on the entity bean.

These settings are applicable only for EJB 2.x-compliant entity beans that are packaged in EJB 2.x-compliant modules. Connection sharing between beans with bean-managed persistence and those with container-managed persistence is possible if they all use the same access intent policy.

Name

Specifies a name for a mapping between an access intent policy and one or more methods.

Description

Contains text that describes the mapping.

Methods - Name

Name of an enterprise bean method, or the asterisk character (*). The asterisk is used to denote all of the methods of an enterprise bean's remote and home interfaces.

Methods - Enterprise bean

Specifies which enterprise bean contains the methods indicated in the Name setting.

Methods - Type

Used to distinguish between a method with the same signature that is defined in both the home and remote interface. Use Unspecified if an access intent policy applies to all methods of the bean.

Data type String
Range Valid values are Home, Remote,Local, LocalHome or Unspecified

Methods - Parameters

Contains a list of fully qualified Java type names of the method parameters. This setting is used to identify a single method among multiple methods with an overloaded method name.

Applied access intent

Specifies how the container must manage data access for persistence. Configurable both as a default access intent for an entity and as part of a method-level access intent policy.

Data type String
Range Valid settings are wsPessimisticUpdate, wsPessimisticUpdate-NoCollision, wsPessimisticUpdate-Exclusive, wsPessimisticUpdate-WeakestLockAtLoad, wsPessimisticRead, wsOptimisticUpdate, or wsOptimisticRead. Only wsPessimisticRead and wsOptimisticRead are valid when class-level caching is enabled in the EJB container.

This product supports lazy collections. For each segment of a collection, iterating through the collection (next()) does not trigger a remote method call to retrieve the next remote reference. Two policies (wsPessimisticUpdate and wsPessimisticUpdate-Exclusive) are extremely lazy; the collection increment size is set to 1 to avoid overlocking the application. The other policies have a collection increment size of 25.

Additional information about valid settings follows:

Profile name Concurrency control Access type Transaction isolation
wsPessimisticRead (Note 1) pessimistic read For Oracle, read committed. Otherwise, repeatable read
wsPessimisticUpdate (Note 2) pessimistic update For Oracle, read committed. Otherwise, repeatable read
wsPessimisticUpdate-Exclusive (Note 3) pessimistic update serializable
wsPessimisticUpdate-NoCollision (Note 4) pessimistic update read committed
wsPessimisticUpdate-WeakestLockAtLoad (Note 5) pessimistic update Repeatable read
wsOptimisticRead optimistic read read committed
wsOptimisticUpdate (Note 6) optimistic update read committed

Notes:

  1. Read locks are held for the duration of the transaction.

  2. The generated SELECT FOR UPDATE query grabs locks at the beginning of the transaction.

  3. SELECT FOR UPDATE is generated; locks are held for the duration of the transaction.

  4. Generated overqualified-update query forces failure if CMP column values have changed since the beginning of the transaction.


 

See Also


Access intent policies
Concurrency control