You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Rick Curtis (JIRA)" <ji...@apache.org> on 2010/07/14 23:35:51 UTC
[jira] Updated: (OPENJPA-1706) In JDBCStoreManager . connect
method, should check if connection is closed
[ https://issues.apache.org/jira/browse/OPENJPA-1706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Curtis updated OPENJPA-1706:
---------------------------------
Attachment: OPENJPA-1706.patch
Attaching a patch with the suggested code change and a unit test.
To force the reported condition I closed the underlying connection without the JDBCStoreManager being aware that it was closed.
> 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.