You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Rick Curtis (JIRA)" <ji...@apache.org> on 2010/10/26 18:42:20 UTC
[jira] Created: (OPENJPA-1855) OpenJPA shouldn't silently ignore an
invalid javax.persistence.xxxx configuration property
OpenJPA shouldn't silently ignore an invalid javax.persistence.xxxx configuration property
------------------------------------------------------------------------------------------
Key: OPENJPA-1855
URL: https://issues.apache.org/jira/browse/OPENJPA-1855
Project: OpenJPA
Issue Type: Improvement
Components: logging
Reporter: Rick Curtis
Assignee: Rick Curtis
Priority: Minor
While I was working on a unit test I had the following property set and it was being silently ignored by the runtime. After digging around a bunch, I figured out that it is actually an invalid configuration. I can specify this property on em.setProperty(...)[3.7.2], but I can't set a 'default' value at the provider(emf) level.
<property name="javax.persistence.cache.storeMode" value="BYPASS"/>
[3.7.2] -
Cache retrieve mode and cache store mode properties may be specified at the level of the persistence
context by means of the EntityManager setProperty method. These properties may be specified for
the EntityManager find and refresh methods and the Query and TypedQuery setHint methods.
Cache retrieve mode and/or cache store mode properties specified for the find, refresh, and
Query and TypedQuery setHint methods override those specified for the persistence context for
the specified find and refresh invocations, and for the execution of the specified queries respectively.
With this JIRA I want to detect *some* of the invalid configurations and log a .... [INFO,WARN,TRACE]? message. Per the spec (8.2.1.9) "If a persistence provider does not recognize a property (other than a property defined by this specification), the provider must ignore it." I believe this gives us the leeway to do something about the condition that I ran into.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1855) OpenJPA shouldn't silently ignore an
invalid javax.persistence.xxxx configuration property
Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Curtis updated OPENJPA-1855:
---------------------------------
Comment: was deleted
(was: The following message is logged if javax.persistence.cache.storeMode is passed in while creating an EMF.
0 test WARN [main] openjpa.Runtime - The property "javax.persistence.cache.storeMode=BYPASS" was detected while loading configuration. However, it is invalid and cannot be configured at the provider level, so it is ignored. Please consult the documentation for the correct usage of this property.)
> OpenJPA shouldn't silently ignore an invalid javax.persistence.xxxx configuration property
> ------------------------------------------------------------------------------------------
>
> Key: OPENJPA-1855
> URL: https://issues.apache.org/jira/browse/OPENJPA-1855
> Project: OpenJPA
> Issue Type: Improvement
> Components: logging
> Affects Versions: 2.0.0, 2.0.1, 2.1.0
> Reporter: Rick Curtis
> Assignee: Rick Curtis
> Priority: Minor
> Fix For: 2.1.0
>
> Attachments: OPENJPA-1855.patch
>
>
> While I was working on a unit test I had the following property set and it was being silently ignored by the runtime. After digging around a bunch, I figured out that it is actually an invalid configuration. I can specify this property on em.setProperty(...)[3.7.2], but I can't set a 'default' value at the provider(emf) level.
> <property name="javax.persistence.cache.storeMode" value="BYPASS"/>
> [3.7.2] -
> Cache retrieve mode and cache store mode properties may be specified at the level of the persistence
> context by means of the EntityManager setProperty method. These properties may be specified for
> the EntityManager find and refresh methods and the Query and TypedQuery setHint methods.
> Cache retrieve mode and/or cache store mode properties specified for the find, refresh, and
> Query and TypedQuery setHint methods override those specified for the persistence context for
> the specified find and refresh invocations, and for the execution of the specified queries respectively.
> With this JIRA I want to detect *some* of the invalid configurations and log a .... [INFO,WARN,TRACE]? message. Per the spec (8.2.1.9) "If a persistence provider does not recognize a property (other than a property defined by this specification), the provider must ignore it." I believe this gives us the leeway to do something about the condition that I ran into.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1855) OpenJPA shouldn't silently ignore an
invalid javax.persistence.xxxx configuration property
Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Curtis updated OPENJPA-1855:
---------------------------------
Affects Version/s: 2.1.0
2.0.0
2.0.1
Fix Version/s: 2.1.0
> OpenJPA shouldn't silently ignore an invalid javax.persistence.xxxx configuration property
> ------------------------------------------------------------------------------------------
>
> Key: OPENJPA-1855
> URL: https://issues.apache.org/jira/browse/OPENJPA-1855
> Project: OpenJPA
> Issue Type: Improvement
> Components: logging
> Affects Versions: 2.0.0, 2.0.1, 2.1.0
> Reporter: Rick Curtis
> Assignee: Rick Curtis
> Priority: Minor
> Fix For: 2.1.0
>
> Attachments: OPENJPA-1855.patch
>
>
> While I was working on a unit test I had the following property set and it was being silently ignored by the runtime. After digging around a bunch, I figured out that it is actually an invalid configuration. I can specify this property on em.setProperty(...)[3.7.2], but I can't set a 'default' value at the provider(emf) level.
> <property name="javax.persistence.cache.storeMode" value="BYPASS"/>
> [3.7.2] -
> Cache retrieve mode and cache store mode properties may be specified at the level of the persistence
> context by means of the EntityManager setProperty method. These properties may be specified for
> the EntityManager find and refresh methods and the Query and TypedQuery setHint methods.
> Cache retrieve mode and/or cache store mode properties specified for the find, refresh, and
> Query and TypedQuery setHint methods override those specified for the persistence context for
> the specified find and refresh invocations, and for the execution of the specified queries respectively.
> With this JIRA I want to detect *some* of the invalid configurations and log a .... [INFO,WARN,TRACE]? message. Per the spec (8.2.1.9) "If a persistence provider does not recognize a property (other than a property defined by this specification), the provider must ignore it." I believe this gives us the leeway to do something about the condition that I ran into.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1855) OpenJPA shouldn't silently ignore
an invalid javax.persistence.xxxx configuration property
Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Curtis resolved OPENJPA-1855.
----------------------------------
Resolution: Fixed
Committed revision 1028064 to trunk.
> OpenJPA shouldn't silently ignore an invalid javax.persistence.xxxx configuration property
> ------------------------------------------------------------------------------------------
>
> Key: OPENJPA-1855
> URL: https://issues.apache.org/jira/browse/OPENJPA-1855
> Project: OpenJPA
> Issue Type: Improvement
> Components: logging
> Affects Versions: 2.0.0, 2.0.1, 2.1.0
> Reporter: Rick Curtis
> Assignee: Rick Curtis
> Priority: Minor
> Fix For: 2.1.0
>
> Attachments: OPENJPA-1855.patch
>
>
> While I was working on a unit test I had the following property set and it was being silently ignored by the runtime. After digging around a bunch, I figured out that it is actually an invalid configuration. I can specify this property on em.setProperty(...)[3.7.2], but I can't set a 'default' value at the provider(emf) level.
> <property name="javax.persistence.cache.storeMode" value="BYPASS"/>
> [3.7.2] -
> Cache retrieve mode and cache store mode properties may be specified at the level of the persistence
> context by means of the EntityManager setProperty method. These properties may be specified for
> the EntityManager find and refresh methods and the Query and TypedQuery setHint methods.
> Cache retrieve mode and/or cache store mode properties specified for the find, refresh, and
> Query and TypedQuery setHint methods override those specified for the persistence context for
> the specified find and refresh invocations, and for the execution of the specified queries respectively.
> With this JIRA I want to detect *some* of the invalid configurations and log a .... [INFO,WARN,TRACE]? message. Per the spec (8.2.1.9) "If a persistence provider does not recognize a property (other than a property defined by this specification), the provider must ignore it." I believe this gives us the leeway to do something about the condition that I ran into.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1855) OpenJPA shouldn't silently ignore an
invalid javax.persistence.xxxx configuration property
Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Curtis updated OPENJPA-1855:
---------------------------------
Attachment: OPENJPA-1855.patch
The change I'm proposing entails logging a WARNING message anytime "javax.persistence.cache.retrieveMode" or "javax.persistence.cache.storeMode" in encountered. I went back and forth with TRACE vs WARN and I think WARN is the correct direction. This can easily be extended to other javax.persistence.[xx] properties that can't be configured at the provider level.
The message looks something like this :
16 test WARN [main] openjpa.Runtime - The property "javax.persistence.cache.storeMode=BYPASS" was detected while loading configuration. However, it is invalid and cannot be configured at the provider level, so it is ignored. Please consult the documentation for the correct usage of this property.
> OpenJPA shouldn't silently ignore an invalid javax.persistence.xxxx configuration property
> ------------------------------------------------------------------------------------------
>
> Key: OPENJPA-1855
> URL: https://issues.apache.org/jira/browse/OPENJPA-1855
> Project: OpenJPA
> Issue Type: Improvement
> Components: logging
> Reporter: Rick Curtis
> Assignee: Rick Curtis
> Priority: Minor
> Attachments: OPENJPA-1855.patch
>
>
> While I was working on a unit test I had the following property set and it was being silently ignored by the runtime. After digging around a bunch, I figured out that it is actually an invalid configuration. I can specify this property on em.setProperty(...)[3.7.2], but I can't set a 'default' value at the provider(emf) level.
> <property name="javax.persistence.cache.storeMode" value="BYPASS"/>
> [3.7.2] -
> Cache retrieve mode and cache store mode properties may be specified at the level of the persistence
> context by means of the EntityManager setProperty method. These properties may be specified for
> the EntityManager find and refresh methods and the Query and TypedQuery setHint methods.
> Cache retrieve mode and/or cache store mode properties specified for the find, refresh, and
> Query and TypedQuery setHint methods override those specified for the persistence context for
> the specified find and refresh invocations, and for the execution of the specified queries respectively.
> With this JIRA I want to detect *some* of the invalid configurations and log a .... [INFO,WARN,TRACE]? message. Per the spec (8.2.1.9) "If a persistence provider does not recognize a property (other than a property defined by this specification), the provider must ignore it." I believe this gives us the leeway to do something about the condition that I ran into.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1855) OpenJPA shouldn't silently ignore
an invalid javax.persistence.xxxx configuration property
Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925500#action_12925500 ]
Rick Curtis commented on OPENJPA-1855:
--------------------------------------
The following message is logged if javax.persistence.cache.storeMode is passed in while creating an EMF.
0 test WARN [main] openjpa.Runtime - The property "javax.persistence.cache.storeMode=BYPASS" was detected while loading configuration. However, it is invalid and cannot be configured at the provider level, so it is ignored. Please consult the documentation for the correct usage of this property.
> OpenJPA shouldn't silently ignore an invalid javax.persistence.xxxx configuration property
> ------------------------------------------------------------------------------------------
>
> Key: OPENJPA-1855
> URL: https://issues.apache.org/jira/browse/OPENJPA-1855
> Project: OpenJPA
> Issue Type: Improvement
> Components: logging
> Affects Versions: 2.0.0, 2.0.1, 2.1.0
> Reporter: Rick Curtis
> Assignee: Rick Curtis
> Priority: Minor
> Fix For: 2.1.0
>
> Attachments: OPENJPA-1855.patch
>
>
> While I was working on a unit test I had the following property set and it was being silently ignored by the runtime. After digging around a bunch, I figured out that it is actually an invalid configuration. I can specify this property on em.setProperty(...)[3.7.2], but I can't set a 'default' value at the provider(emf) level.
> <property name="javax.persistence.cache.storeMode" value="BYPASS"/>
> [3.7.2] -
> Cache retrieve mode and cache store mode properties may be specified at the level of the persistence
> context by means of the EntityManager setProperty method. These properties may be specified for
> the EntityManager find and refresh methods and the Query and TypedQuery setHint methods.
> Cache retrieve mode and/or cache store mode properties specified for the find, refresh, and
> Query and TypedQuery setHint methods override those specified for the persistence context for
> the specified find and refresh invocations, and for the execution of the specified queries respectively.
> With this JIRA I want to detect *some* of the invalid configurations and log a .... [INFO,WARN,TRACE]? message. Per the spec (8.2.1.9) "If a persistence provider does not recognize a property (other than a property defined by this specification), the provider must ignore it." I believe this gives us the leeway to do something about the condition that I ran into.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.