[ 
https://issues.apache.org/jira/browse/OPENJPA-878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681376#action_12681376
 ] 

Donald Woods commented on OPENJPA-878:
--------------------------------------

I'll take a look at #1/#2 to see what can be done, but there were several 
abstract interfaces being used that didn't extend a common parent (and I was 
afraid of breaking APIs again.)
For #3, I'll add a comment in OPENJPA-957, to update the docs if we don't end 
up switching to use the db server lock timeout support.
For #4, my thoughts were that if someone provides a query.timeout value/hint, 
then we should try to honor it everywhere, as the usage of setQueryTimeout() is 
to prevent JDBC client apps from waiting forever on blocked or missed server 
responses due to network or db problems.
For the FIXME, I noticed in Eclipse there were tons of existing FIXME/TODO 
comment tags, so I also used it to denote pending work items....

Thanks for the review.


> Support default query hint for query timeout
> --------------------------------------------
>
>                 Key: OPENJPA-878
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-878
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: query
>    Affects Versions: 2.0.0
>            Reporter: Donald Woods
>            Assignee: Donald Woods
>             Fix For: 2.0.0
>
>         Attachments: OPENJPA-878-20090305-draft.patch, 
> OPENJPA-878-20090306.patch, OPENJPA-878-20090310-eclipse.patch, 
> OPENJPA-878-20090310.patch, OPENJPA-878-20090311-eclipse.patch, 
> OPENJPA-878-20090311.patch, OPENJPA-878-20090311.patch, 
> OPENJPA-878-docs-20090311.patch
>
>
> Support default query hint for query timeout as defined in section 3.6.4 of 
> the spec.
> A new hint can be supplied for Java SE and Java EE environments -
>     javax.persistence.query.timeout // query timeout in seconds
> Can be used in the following:
>     Methods - Query.setHint()
>     Annotations (via QueryHint) - NamedQuery, NativeNamedQuery 
>     Properties - Persistence.createEntityManagerFactory, persistence.xml
> The following methods can return a javax.persistence.QueryTimeoutException: 
> getResultList(), getSingleResult(), executeUpdate().
> If a QTE is thrown, the current transaction (if active) should not be marked 
> for rollback.
> If the DB query timeout causes a rollback, then a PersistenceException should 
> be thrown instead (see 3.6.1).

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

Reply via email to