WebSphere® Application
Server gives you the option to set access intent policies for your
entity
enterprise beans as a way of managing their transfer of data with
the underlying
data store. An access intent policy controls the isolation level used
on the
data source connection, as well as the database locks used during
data retrieval.
By manipulating these elements, you can maximize the efficiency of
your application's
data flow.
To learn more, begin with the topic, Access
intent policies and the topic,
Concurrency control.
When formulating dynamic queries, keep
in mind the following considerations
concerning their interaction with access intent policies:
- A
dynamic query uses the first ASN name in the FROM clause to determine
access intent.
- The collection increment attribute of an access
intent policy is not used
in processing a dynamic query.
- When performed on entity beans
that have a pessimistic-Update access intent
policy, your dynamic queries must return updateable collections. Therefore
you need to formulate your query statements to return only collections
of
entity beans, not collections of CMP fields. For example, the
statement select
object(c) from Customer is valid for a dynamic query performed
under
the constraint of a pessimistic-Update policy. The statement select
c.name from Customer c, however, is not a valid dynamic query
under
this constraint.
- Using pessimistic-Update policy places restrictions
on the types of query
expressions. The restrictions depend on the back end database type
and release.
Refer to the topic Access intent – isolation levels and update
locks, for details.