Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 20775 invoked from network); 20 Jul 2010 17:50:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Jul 2010 17:50:17 -0000 Received: (qmail 33835 invoked by uid 500); 20 Jul 2010 17:50:16 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 33630 invoked by uid 500); 20 Jul 2010 17:50:16 -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 33622 invoked by uid 99); 20 Jul 2010 17:50:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jul 2010 17:50:15 +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; Tue, 20 Jul 2010 17:50:13 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o6KHnpr5001113 for ; Tue, 20 Jul 2010 17:49:51 GMT Message-ID: <19165594.479481279648191660.JavaMail.jira@thor> Date: Tue, 20 Jul 2010 13:49:51 -0400 (EDT) From: "David Wolverton (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-1706) In JDBCStoreManager . connect method, should check if connection is closed In-Reply-To: <30218959.18291277312451911.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890349#action_12890349 ] David Wolverton commented on OPENJPA-1706: ------------------------------------------ @Rick -- That is correct. > In JDBCStoreManager . connect method, should check if connection is closed > -------------------------------------------------------------------------- > > Key: OPENJPA-1706 > URL: https://issues.apache.org/jira/browse/OPENJPA-1706 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 1.2.2, 2.0.0 > Environment: We were using 1.2.2, but I see the same problem code in trunk. > Reporter: David Wolverton > Assignee: Rick Curtis > Priority: Minor > Attachments: OPENJPA-1706.patch > > > The code currently reads: > // connect if the connection is currently null, or if > // the connection has been closed out from under us > if (_conn == null) > _conn = connectInternal(); > The comment indicates that it should check for null or closed, but the code only checks for closed. Our application got to the state where connection was actually closed but not null. We patched this with the following code to make it work: > if (_conn == null || _conn.isClosed()) > _conn = connectInternal(); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.