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

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

Thanks for the review.
Yep, figured someone would catch the formatting, as I hate the 20+ year old 
standard of 80 column widths, given most everyone has hi-res wide screen 
displays now...  I can fix this in my Eclipse settings for the next patch.

For the other DBs, I'd like to open a subtask for I5.  I would also like to 
include additional tests for setting the property via 
Persistence.createEntityManagerFactory and persistence.xml in I5.

The method signature changes were the only way to get the queryTimeout value 
down into the prepareStatement() and prepareCall() methods, as they currently 
only have access to the Connection, which doesn't have handles to the 
FetchConfiguration or OpenJPAConfiguration classes.

Adding queryTimeout support to TableJDBCSeq.java would involve either more 
method signature changes and/or creating a FetchConfiguration just to hold the 
QueryTimeout value if it is > 0, as neither the TableJDBCSeq nor 
TableSchemaFactory classes have a FetchConfiguration passed to them today (but 
they do have access to the OpenJPAConfiguration data.)


> 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
>
>
> 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