db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4717) Driver trace file isn't closed/released on physical connection close when specified with the traceFile attribute/setter
Date Mon, 28 Jun 2010 12:02:50 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Kristian Waagan updated DERBY-4717:

    Attachment: derby-4717-1a.diff

Attaching patch 1a, which consists of the following changes:

(production code)
 a) Make Derby close the trace file when the physical connection is closed and the trace file
is specified using 'traceFile' (attribute or setter).
(test code)
 b) Disabled the test 'testClientMessageTextConnectionAttribute', as the test started failing
when I corrected the test. It was using (ConnectionPool|XA)DataSource.getConnection() to obtain
a connection. This method is not an API method, it's an artifact due to Derby's subclassing
(the two mentioned data sources extend ClientBaseDataSource). DERBY-4067 trace the problem
that the connection attributes are not picked up.
 c) Made the tests obtain the physical connections from data source by using the correct method
(i.e. getXAConnection, getPooledConnection or getConnection).
 d) Extended the test 'testClientTraceFileDSConnectionAttribute' to also make sure the trace
files can be deleted (regression test for DERBY-4717).
 e) Added 'getPhysicalConnection(Object ds)' for the cases where a physical connection is
to be obtained, but the data source can be of any (Derby) type.

I need someone to test this patch on Windows, i.e. that jdbcapi.J2EEDataSourceTest.testClientTraceFileDSConnectionAttribute
fails without the changes to ClientBaseDataSource.

Patch ready for review.

> Driver trace file isn't closed/released on physical connection close when specified with
the traceFile attribute/setter
> -----------------------------------------------------------------------------------------------------------------------
>                 Key: DERBY-4717
>                 URL: https://issues.apache.org/jira/browse/DERBY-4717
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions:
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-4717-1a.diff
> When specifying a trace file with the traceFile connection URL attribute or with the
data source setter method, the handle to the trace file isn't released when the physical connection
is closed.
> The problem may be specific to the implementations of ConnectionPoolDataSource and XADataSource,
as using a plain data source doesn't involve reuse (i.e another mechanism may close the trace
file handle).
> Two potential problems caused by this bug:
>  o resource leak  (i.e., too many file handles open)
>  o trace files cannot be deleted on Windows (seen for DERBY-4709)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message