Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 45009 invoked from network); 13 Feb 2009 21:23:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2009 21:23:21 -0000 Received: (qmail 90336 invoked by uid 500); 13 Feb 2009 21:23:20 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 90309 invoked by uid 500); 13 Feb 2009 21:23:20 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 90298 invoked by uid 99); 13 Feb 2009 21:23:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2009 13:23:20 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2009 21:23:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 91604234C48C for ; Fri, 13 Feb 2009 13:22:59 -0800 (PST) Message-ID: <918246970.1234560179594.JavaMail.jira@brutus> Date: Fri, 13 Feb 2009 13:22:59 -0800 (PST) From: "Pinaki Poddar (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-849) Add metadata-type getter methods to EntityManager In-Reply-To: <1257441603.1231187145223.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673377#action_12673377 ] Pinaki Poddar commented on OPENJPA-849: --------------------------------------- queryTimeout.setLoadKey("javax.persistence.query.timeout"); queryTimeout.setDefault("-1"); queryTimeout.set(-1); queryTimeout.setDynamic(true); does not seem kosher for the following reason: 1. loadKey is the key with which a property is loaded from configuration artifacts. At this point of execution, no property has been *actually* loaded, they are merely being declared to exist. Hence we should not be setting load key. 2. configuration declares a Value. But does not assign its value. So setting its value to -1 does not look alright. Setting default value is OK. These issues gain significance in the light of the fact the configuration's hashcode is the key to a factory in JNDI. And computation of hashcode depends on the actual value of the Values. As an extreme example, assume two Configuration C1 and C2 nearly identical but differs *only* in their query.timeout value. The requirement is hash code for C1 and C2 must not be equal. And that is what Configuration.hashCode() ensures. But, because we are setting query timeout to -1 (that is not what the user's p.xml sets) and it is marked as dynamic, in both cases Configuration hashcode will treat query.timeout value to be -1 and will end up computing same hashcode for C1 and C2. > Add metadata-type getter methods to EntityManager > ------------------------------------------------- > > Key: OPENJPA-849 > URL: https://issues.apache.org/jira/browse/OPENJPA-849 > Project: OpenJPA > Issue Type: Sub-task > Affects Versions: 2.0.0 > Reporter: Dianne Richards > Assignee: Dianne Richards > Attachments: doc_patch.txt, patch.txt, patch.txt, patch3.txt, patch_reset.txt > > > This task is for supporting the new 2.0 EntityManager methods getProperties() and getSupportedProperties() -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.