openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2329) OpenJPA should close JDBC metadata (and all) statements
Date Thu, 07 Feb 2013 18:25:13 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-2329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573748#comment-13573748
] 

Kathey Marsden commented on OPENJPA-2329:
-----------------------------------------

The Connection does not keep a list of the open statements so they are not closed explicitly
on connection close.  

 The problem with the user  case was that under a fully loaded system (seems most likely linux
vm's) the garbage collection did not kick in before we reach the 32K open statement limit
(A DRDA limit).   

 So there is no reference but yet since the statement has not been explicitly closed or garbage
collected and closed on finalization, the "section number" for that statement can't be reused.
                
> OpenJPA should close JDBC metadata (and all) statements 
> --------------------------------------------------------
>
>                 Key: OPENJPA-2329
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2329
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: SuSE linux vm loaded to the point that garbage collection not likely
to kick in
>            Reporter: Kathey Marsden
>
> Please close all JDBC Metadata statements after execution  in OpenJPA to avoid a potential
interaction issue with Derby Network Client.  See details at: https://issues.apache.org/jira/browse/DERBY-6055.
> The statement can be obtained with ResultSet.getStatement() e.g.
>       for (int i = 0; i < 50000; i++) {
>                 ResultSet rs = conn.getMetaData().getSchemas();
>                 while (rs.next()) {
>                     //System.out.println("SCHEM NAME = " + rs.getString(1));
>                 }
>                 rs.getStatement().close();  <====
>             } 
> In debugging a recent DERBY client/OpenJPA interaction issue, I saw in  that  there were
a fair number of JDBC metadata Result Sets that  did not get cleaned up until garbage collection
kicked in. 
> There is a program in-lined in  the description of DERBY-6055 that shows how metadata
statements can build up and could potentially exceed the maximum number of sections if garbage
collection did not kick in on time on a loaded system. 
> Sorry for the lack of OpenJPA version detail and repro as I don't have any personal experience
with OpenJPA and was not able to get information on OpenJPA version from the user.  The user's
primary statement issue was a different so they did not have time to follow up on this potential
one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message