openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <>
Subject [jira] [Commented] (OPENJPA-2517) Incorrect the time unit of query timeout value.
Date Wed, 23 Jul 2014 12:41:38 GMT


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

View raw message