[
https://issues.apache.org/jira/browse/OPENJPA-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14071664#comment-14071664
]
Rick Curtis commented on OPENJPA-2517:
--------------------------------------
I dug into this one a bit and it appears that the root issue is that when we
implemented this support, it was against a non-final version of the JPA-2.0
spec. If you take a look at OPENJPA-878, you'll see the following comment :
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
I looked back through some non-final revisions of the spec, and this property
did indeed change from seconds to milliseconds.
That being said, I'm somewhat afraid to just fix this problem as users of
OpenJPA could be unknowingly relying on this behavior(bug). In addition to
fixing the bug, I believe that we'll need to add a compatibility switch to
support running with javax.persistence.query.timeout as seconds.
> Incorrect the time unit of query timeout value.
> -----------------------------------------------
>
> Key: OPENJPA-2517
> URL: https://issues.apache.org/jira/browse/OPENJPA-2517
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.2.0, 2.2.1, 2.2.2, 2.3.0
> Reporter: Masafumi Koba
> Attachments: OPENJPA-2517.patch, openjpa-querytimeout-bug.zip
>
>
> The value of the "javax.persistence.query.timeout" property have been passed
> to the java.sql.Statement.setQueryTimeout(int) in milliseconds rather than
> seconds.
> The query timeout milliseconds should be converted to seconds.
--
This message was sent by Atlassian JIRA
(v6.2#6252)