openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Bauer (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-990) setHint should return IllegalArgumentException for invalid query/lock timeout values
Date Thu, 26 Mar 2009 00:07:50 GMT

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

Jeremy Bauer commented on OPENJPA-990:
--------------------------------------

There is a minor problem with the patch.  The Localizer will try to load the "invalid-timeout"
message from the resource package of FetchConfigurationImpl (org.apache.openjpa.kernel). 
The message is in "org/apache/openjpa/util/localizer.properties".  The message must also be
added to org/apache/openjpa/kernel/localizer.properties in order to be loaded.  I set some
breakpoints in the code to verify that the message does not get loaded in FetchConfigurationImpl.

Also, the message contains this sentence:  Expected a value that is greater than or equal
to zero.  Should this read "greater than or equal to -1 ", since -1 is also valid?

> setHint should return IllegalArgumentException for invalid query/lock timeout values
> ------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-990
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-990
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: query
>    Affects Versions: 2.0.0
>            Reporter: Donald Woods
>            Assignee: Jeremy Bauer
>             Fix For: 2.0.0
>
>         Attachments: OPENJPA-990.patch
>
>
> JPA2 spec notes that Query.setHint() should throw a IllegalArgumentException if a supplied
hint value is not valid for a given implementation.
> For lock/query timeout, any user supplied value < -1 is invalid and should throw an
exception, which is not occurring.

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


Mime
View raw message