> We were unaware that fetch plan properties could be set as Hints.  Now
> that we look at the code we see this,  but we did not find this when
> we read the OpenJPA documentation. 

Yeah, it seems like we should probably do some documentation of some of
these newer configuration options.

> The only hint we found in the
> documentation was the OracleSelectHint and so our design was based on
> how OracleSelectHint was implemented.  OracleSelectHint is not
> implemented as a FetchPlan property.

FWIW, OracleSelectHint is implemented as it is because it's a proper
hint -- it only affects how Oracle performs the selects, has no real
side effects, and is fully Oracle-specific.

> Why don't you integrate your patch and then we will rerun our tests to
> make sure the function works as we had originally intended.

Are there any test cases that you guys could make available so that I
could experiment with whether or not the lock level checks are
necessary, or if they're duplicate code? Also, we should address Abe's
concern about whether the isolation level stuff is useful to databases
other than just DB2. My assumption has been that it is, but it'd be good
to confirm that this could be used more widely before making it a
published API.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: David Wisneski [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, April 05, 2007 11:35 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: [jira] Commented: (OPENJPA-182) db2 update lock 
> syntax WITH <isolation> USE AND KEEP UPDATE LOCKS
> 
> Patrick,
> 
> We were unaware that fetch plan properties could be set as Hints.  Now
> that we look at the code we see this,  but we did not find this when
> we read the OpenJPA documentation.  The only hint we found in the
> documentation was the OracleSelectHint and so our design was based on
> how OracleSelectHint was implemented.  OracleSelectHint is not
> implemented as a FetchPlan property.
> 
> Why don't you integrate your patch and then we will rerun our tests to
> make sure the function works as we had originally intended.
> 
> 
> On 4/5/07, Patrick Linskey (JIRA) <[EMAIL PROTECTED]> wrote:
> >
> >    [ 
> https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atl
assian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_1248704
6 ]
> >
> > Patrick Linskey commented on OPENJPA-182:
> > -----------------------------------------
> >
> > > > Hopefully, this will be useful for applications where 
> there are "hot" tables
> > > > that require pessimistic locking even though the rest 
> of the application
> > > > does better with optimistic.
> > >
> > > That's what our lock levels and lock APIs are for. I'm 
> still not clear on what this is
> > > adding to the mix for most DBs.
> >
> > Not really -- the lock levels allow the user to configure 
> how locking should happen, not what the isolation level 
> should be for the locks.
> >
> > I don't know about what levels of support non-DB2 databases 
> have for per-query isolation level configuration. Does anyone 
> have any experience with this in other databases?
> >
> > Oh, and regardless, we should change the base DBDictionary 
> to throw an exception if this FetchPlan setting is set but 
> not serviceable.
> >
> > One thing that we should test: I'm not convinced that the 
> lock level override in the DB2Dictionary code is necessary. 
> It's possible that the LockManager will already take into 
> account the current JDBCFetchConfiguration's lock level 
> settings when specifying the forUpdate setting for the 
> toSelect() clause. Some test cases will make it easy to 
> figure out the answer to this question.
> >
> > > db2 update lock syntax  WITH <isolation> USE AND KEEP UPDATE LOCKS
> > > ------------------------------------------------------------------
> > >
> > >                 Key: OPENJPA-182
> > >                 URL: 
> https://issues.apache.org/jira/browse/OPENJPA-182
> > >             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: OPENJPA-182.patch, 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 KEEP UDPATE LOCKS
> > > 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 locks.
> > > 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.
> >
> >
> 

Notice:  This email message, together with any attachments, may contain 
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally 
privileged, and is intended solely for the use of the individual or entity 
named in this message. If you are not the intended recipient, and have received 
this message in error, please immediately return this by email and then delete 
it.

Reply via email to