Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 57371 invoked from network); 20 Dec 2010 16:00:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Dec 2010 16:00:28 -0000 Received: (qmail 93545 invoked by uid 500); 20 Dec 2010 16:00:28 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 93196 invoked by uid 500); 20 Dec 2010 16:00:25 -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 93176 invoked by uid 99); 20 Dec 2010 16:00:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Dec 2010 16:00:23 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Dec 2010 16:00:23 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oBKG01Hd028965 for ; Mon, 20 Dec 2010 16:00:02 GMT Message-ID: <24415396.216911292860801579.JavaMail.jira@thor> Date: Mon, 20 Dec 2010 11:00:01 -0500 (EST) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-1899) Evict from L2 of a object causes secondary objects to never be loaded in graph In-Reply-To: <29023835.3801291050791349.JavaMail.jira@thor> 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:comment-tabpanel&focusedCommentId=12973235#action_12973235 ] Rick Curtis commented on OPENJPA-1899: -------------------------------------- Robert - I ran with your provided example this morning with 2.1.x and here is the result that I'm seeing: C:\dev\jpa\tmp\evictproblem\bin>c:\java6-sun\bin\java.exe -cp ..\conf;..\classes;..\lib\jdbcdrivers\mysql-connector-java-3.1.13-bin.jar;..\lib\openjpa2.0.1\openjpa-all-2.1.0-SNAPSHOT.jar com.foo.bar.app.EvictTest In order to run this test, you must configure the remote commit provider setting for SJVM. 58 evictproblem INFO [main] openjpa.Runtime - Starting OpenJPA 2.1.0-SNAPSHOT 139 evictproblem INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.MySQLDictionary". 770 evictproblem INFO [main] openjpa.Runtime - The Entity "com.foo.bar.models.Contact" was enhanced at level "2", but the current level of enhancement is "961,774". 774 evictproblem INFO [main] openjpa.Runtime - A down level Entity was detected and logged. Please enable RUNTIME trace to see all down level Entities. The address from first find is: This is the original street address The address from second find is: This is the original street address The address before rollback is: This is a new street address The address after rollback is: This is the original street address The address from third find is: This is the original street address Thanks, Rick > 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, 2.0.1 > Environment: N/A > Reporter: Robert Krier > Priority: Blocker > Attachments: evictproblem.zip, evictproblem.zip, OPENJPA-1899.test.patch > > > 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. - You can reply to this email to add a comment to the issue online.