openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <>
Subject [jira] [Commented] (OPENJPA-2329) OpenJPA should close JDBC metadata (and all) statements
Date Wed, 06 Feb 2013 19:57:13 GMT


Rick Curtis commented on OPENJPA-2329:

Will all of these metadata resources get cleaned up if connection.close() is invoked?
> OpenJPA should close JDBC metadata (and all) statements 
> --------------------------------------------------------
>                 Key: OPENJPA-2329
>                 URL:
>             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:
> The statement can be obtained with ResultSet.getStatement() e.g.
>       for (int i = 0; i < 50000; i++) {
>                 ResultSet rs = conn.getMetaData().getSchemas();
>                 while ( {
>                     //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

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:

View raw message