From open-jpa-dev-return-3729-apmail-incubator-open-jpa-dev-archive=incubator.apache.org@incubator.apache.org Tue Apr 24 22:20:38 2007 Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 50185 invoked from network); 24 Apr 2007 22:20:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2007 22:20:37 -0000 Received: (qmail 12348 invoked by uid 500); 24 Apr 2007 22:20:44 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 12212 invoked by uid 500); 24 Apr 2007 22:20:43 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 12203 invoked by uid 99); 24 Apr 2007 22:20:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 15:20:43 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 15:20:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4F5EF714062 for ; Tue, 24 Apr 2007 15:20:15 -0700 (PDT) Message-ID: <31022204.1177453215312.JavaMail.jira@brutus> Date: Tue, 24 Apr 2007 15:20:15 -0700 (PDT) From: "Bret Weinraub (JIRA)" To: open-jpa-dev@incubator.apache.org Subject: [jira] Updated: (OPENJPA-219) Reflection: negative caching would be beneficial in redeployment scenarios In-Reply-To: <3249611.1176841935270.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-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bret Weinraub updated OPENJPA-219: ---------------------------------- Attachment: openJPABenchmark.tar.gz My benchmark code. Easy to write a new implementation and get comparitive benchmark data. Measurements created in this issue were generated from this code. > Reflection: negative caching would be beneficial in redeployment scenarios > -------------------------------------------------------------------------- > > Key: OPENJPA-219 > URL: https://issues.apache.org/jira/browse/OPENJPA-219 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 0.9.0, 0.9.6, 0.9.7 > Reporter: Patrick Linskey > Assigned To: Patrick Linskey > Fix For: 0.9.8 > > Attachments: OPENJPA-219-NoLeak.patch, OPENJPA-219.patch, openJPABenchmark.tar.gz > > > In a variety of situations, OpenJPA searches class hierarchies for fields. These searches invoke Class.getDeclaredField() in order to find non-public fields. This method throws an exception when it fails to find the specified field, and the exception creation is, as ever, slow. > It would be useful to create a static (and thus per-classloader) Map,Collection> of fields known not to be available in a given class. > It may also be beneficial to maintain a cache of which fields *are* present in a given class, but this issue is being filed as a result of a demonstrated performance hit during deployment due to the lack of a negative cache. If we obtain quantitative data indicating that a positive cache would be useful, we might want to implement such a thing at that time. > Trace 3 (2115 occurances): [excepti][00090] java/lang/NoSuchFieldException: domainName > at java/lang/Class.getDeclaredField(Ljava/lang/String;I)Ljava/lang/reflect/Field;(Unknown Source) > at org/apache/openjpa/enhance/Reflection.findField(Ljava/lang/Class;Ljava/lang/String;Z)Ljava/lang/reflect/Field;(Reflection.java:101) > at org/apache/openjpa/util/ApplicationIds.toPKValues(Ljava/lang/Object;Lorg/apache/openjpa/meta/ClassMetaData;)[Ljava/lang/Object; > (ApplicationIds.java:89) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.