WebSphere Application Server access intent policies provide a consistent way of defining the isolation level for CMP bean data across the different relational databases that might be used in your environment. Within a deployed application, the combination of an access intent policy concurrency definition and access type signifies the isolation level value that WebSphere Application Server sets on the database connection. This combination also signifies the update lock flag that Application Server passes to the database through a JDBC prepared statement. Within the database, the isolation level that is configured by WebSphere Application Server corresponds to a single setting that can differ across database vendors.
The following matrix shows how access intent policies correspond to different database isolation levels and update lock settings:
Access Intent profile | Isolation level | Update lock implementation | |||||
---|---|---|---|---|---|---|---|
DB2 | Oracle* | SyBase | Informix | Cloudscape | SQL Server | ||
wsPessimisticUpdate- Weakest LockAtLoad (Default policy) | RR | RC | RR | RR | RR | RR | No (*Oracle, Yes) |
wsPessimisticUpdate | RR | RC | RR | RR | RR | RR | Yes |
wsPessimisticRead | RR | RC | RR | RR | RR | RR | No |
wsOptimisticUpdate | RC | RC | RC | RC | RC | RC | No |
wsOptimisticRead | RC | RC | RC | RC | RC | RC | No |
wsPessimisticUpdateNo-Collisions | RC | RC | RC | RC | RC | RC | No |
wsPessimisticUpdate- Exclusive | S | S | S | S | S | S | Yes |
Structured Query Language (SQL) keywords and restrictions
The following table shows which SQL keywords are used during update intent locking, as well as any restrictions imposed on the SQL.
Database | SQL syntax used for locking update | join restrictions | order by restrictions | subselect restrictions | aggregation restrictions |
---|---|---|---|---|---|
DB2 | FOR UPDATE OF | not allowed | not allowed | not allowed | not allowed |
DB2 UDB for iSeries | FOR UPDATE OF | not allowed | allowed with limitations* | allowed with limitations* | not allowed |
DB2 on z/OS V8.x | WITH RS/RR USE AND KEEP UPDATE LOCKS | none | none | none | none |
DB2 UDB workstation V8.2 | WITH RS/RR USE AND KEEP UPDATE LOCKS | none | none | none | none |
Oracle | FOR UPDATE | none | none | none | none |
Cloudscape | FOR UPDATE OF | not allowed | not allowed | not allowed | not allowed |
Informix | FOR UPDATE | not allowed | not allowed | not allowed | not allowed |
Sybase | FOR UPDATE | not allowed | not allowed | not allowed | not allowed |
Sqlserver | UPDLOCK | not allowed | not allowed | not allowed | not allowed |