openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ritika Maheshwari (JIRA)" <>
Subject [jira] Commented: (OPENJPA-182) db2 update lock syntax WITH <isolation> USE AND KEEP UPDATE LOCKS
Date Thu, 29 Mar 2007 19:20:25 GMT


Ritika Maheshwari commented on OPENJPA-182:

1. The updateFlag is set to true when the JPA query is running in pessimistic mode.Where as
with hint even when u are in optimistic mode you can get the update flags.This way user can
use the standard JPA api setHint and get the lock clause.Where as in the other case they need
to use OpenJPA specific api.Besides hint is per query basis.We also needed the hints for Static
SQL and Named Queries.

2. I do not understand what u mean by rule versus hint.Isolation level hint tells us whther
to add WITH RR or WITH RS.And again this is per query basis where as the isolation hint through
the persistence.xml is to broad applying to all the entities.Then again we need the hints
for NamedQuery and Static SQL.

3. Agreed

> db2 update lock syntax  WITH <isolation> USE AND KEEP UPDATE LOCKS
> ------------------------------------------------------------------
>                 Key: OPENJPA-182
>                 URL:
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: jdbc
>         Environment: db2 database driver for zOS, AS400, Unix, Windows, Linux
>            Reporter: David Wisneski
>         Assigned To: David Wisneski
>         Attachments: openJPA182.patch
> A while back we changed the syntax of update locking from FOR UPDATE OF  to  WITH RS
USE AND KEEP UPDATE LOCKS.   Additional changes are required because 
> 1.  if isolation=serializable is configured, then the syntax should be  WITH RR USE AND
> 2.  when using DB2/400 on iSeries machines, the syntax is WITH RS USE AND KEEP EXCLUSIVE
LOCKS  or WITH RR USE AND KEEP EXCLUSIVE LOCKS because DB2/400 only supports read or exclusive
> 3.  DB2 supports both a FETCH FIRST  ROWS and update LOCKS clauses.
> So we change supportsLockingWithSelectRange = true in the AbstractDB2Dictionary class
and change the DB2Dictionary to append the correct LOCKS syntax depending on vendor, release
and isolation level.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message