Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 25499 invoked from network); 31 Mar 2011 21:32:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Mar 2011 21:32:24 -0000 Received: (qmail 10575 invoked by uid 500); 31 Mar 2011 21:05:43 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 10506 invoked by uid 500); 31 Mar 2011 21:05:43 -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 10494 invoked by uid 99); 31 Mar 2011 21:05:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Mar 2011 21:05:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Mar 2011 21:05:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C4FDA8CE1D for ; Thu, 31 Mar 2011 21:05:05 +0000 (UTC) Date: Thu, 31 Mar 2011 21:05:05 +0000 (UTC) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Message-ID: <1542557437.25690.1301605505788.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <29023835.3801291050791349.JavaMail.jira@thor> Subject: [jira] [Updated] (OPENJPA-1899) Evict from L2 of a object causes secondary objects to never be loaded in graph MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-1899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Curtis updated OPENJPA-1899: --------------------------------- Affects Version/s: (was: 2.0.1) > Evict from L2 of a object causes secondary objects to never be loaded in graph > ------------------------------------------------------------------------------ > > Key: OPENJPA-1899 > URL: https://issues.apache.org/jira/browse/OPENJPA-1899 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 2.0.0 > Environment: N/A > Reporter: Robert Krier > Assignee: Rick Curtis > Priority: Blocker > Fix For: 2.1.0 > > Attachments: OPENJPA-1899.test.patch, evictproblem.zip > > > I have a simple example. A customer has a reference to an address and a (primary) contact (an extension of person). Find the customer, get the contact and evict it from L2. Now find the customer again using a new entity manager. Begin a Tx and change the address of the contact and then call Customer.getPrimaryContact() (this is important) Rollback the Tx. Now find the customer again using another new EntityManager and call Customer.getPrimaryContact().getAddress(). The address associated with the contact is Null and not the original address as expected. The same scenario works fine under OpenJPA 1.2.2. > The reason this is a big problem for us is we use L2 caching in our application and the application is clustered. The same problem occurs if different nodes in the cluster operate on the same objects. In a cluster "evict" is not directly called, but the RemoteCommitProvider will evict the L2 and create the same problem. > I have attached example code to reproduce the problem using a single JVM and calling Evict. I also have another example where you can deploy the code on two nodes in a cluster and see the problem occurs that way as well. Each example contains Unix shell scripts and Windows cmd files as well. Each are paired for JPA 1.0 and JPA 2.0. Again, the problem only occurs under JPA 2.0. > This is a block for us. We cannot ship our product with this type of problem as it means objects and their graph can be corrupted. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira