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 and EJB 3.x-compliant entity beans that are packaged in EJB 2.x and EJB 3.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
Specifies the 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.
Information | Value |
---|---|
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.
Information | Value |
---|---|
Data type | String |
Default | wsPessimisticUpdate-WeakestLockAtLoad. With Oracle, this is the same as wsPessimisticUpdate. |
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.
If an entity is not configured with an access intent policy, the runtime environment typically uses wsPessimisticUpdate-WeakestLockAtLoad by default. If, however, the Lifetime in cache property is set on the bean, the default value of Applied access intent is wsOptimisticRead; updates are not permitted.
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 |
Note:
|