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

Donald Woods commented on OPENJPA-964:
--------------------------------------

When using the MS SQL Server JDBC v2.0 driver and the Delay.dll test code on a 
SQL Server 2005 SP1 system, we can now catch the query timeout exceptions (only 
UPDATE tests testQueryTimeout31c and testQueryTimeout33c) and rethrow them as a 
QueryTimeoutException - 

2134  TRACE  [main] openjpa.jdbc.SQL - <t 11165595, conn 3833531> [1072 ms] 
spent
4255  test  TRACE  [main] Tests - testQueryTimeout31c() - Caught expected 
Exception =
<openjpa-2.0.0-SNAPSHOT-r422266:763301M nonfatal store error> 
org.apache.openjpa.persistence.QueryTimeoutException: A query statement timeout 
has occurred.
        at 
org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4379)
...
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: The query has 
timed out. {prepstmnt 13152878 UPDATE QTimeout SET stringField = ? WHERE id = 1 
[params=(String) updated]} [code=0, state=HY008]
        at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:236)
...


> Finish updating sql-error-state- codes.xml for query timeout support on other 
> DBs
> ---------------------------------------------------------------------------------
>
>                 Key: OPENJPA-964
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-964
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: query
>    Affects Versions: 2.0.0
>            Reporter: Donald Woods
>            Assignee: Donald Woods
>             Fix For: 2.0.0
>
>
> Need to add any SQLStatus codes for query timeouts to sql-error-state- 
> codes.xml and handle setting isRecoverable/isFatal in each DBDictionary 
> subclass for other supported DBs besides Derby and DB2.

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