Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 52038 invoked from network); 17 Apr 2008 00:58:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Apr 2008 00:58:45 -0000 Received: (qmail 25941 invoked by uid 500); 17 Apr 2008 00:58:45 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 25925 invoked by uid 500); 17 Apr 2008 00:58:45 -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 25916 invoked by uid 99); 17 Apr 2008 00:58:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2008 17:58:45 -0700 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; Thu, 17 Apr 2008 00:57:55 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 84746234C0D7 for ; Wed, 16 Apr 2008 17:55:29 -0700 (PDT) Message-ID: <2146320146.1208393729541.JavaMail.jira@brutus> Date: Wed, 16 Apr 2008 17:55:29 -0700 (PDT) From: "Catalina Wei (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-574) Cached object in DataCache not evicted due to StatementBatching not reporting OptimisticException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Cached object in DataCache not evicted due to StatementBatching not reporting OptimisticException -------------------------------------------------------------------------------------------------- Key: OPENJPA-574 URL: https://issues.apache.org/jira/browse/OPENJPA-574 Project: OpenJPA Issue Type: Bug Components: jdbc Affects Versions: 1.1.0, 1.2.0 Reporter: Catalina Wei If DataCache is enabled, and the default statement batching is active, there are cases that we fail to report OptimisticException. Because of that, the cached objects were not get removed from the cache. We have testcases running with different backend and returns different updateCount value from batchExecute when update failed: 1. DB2/NT, update count of 0 was returned 2. Oracle 10g, update count of -2 was returned. The code in questioin is in BatchingPreparedStatementManagerImpl.checkUpdateCount() method. We think the returned update count of 0 and -2 should report OptimisticException for UPDATE/DELETE SQL requests. Current implemented code reports OptimisticException if update count of -3 is returned. We don't know if any JDBC driver would return -3 for update/delete that did not qualify due to version value mismatch (in the case that the cache is out of sync with the database). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.