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] Commented: (DERBY-3431) DatabaseMetaData.getConnection returns the wrong connection when using connection pooling
Date Tue, 15 Apr 2008 13:57:05 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589081#action_12589081
] 

Kristian Waagan commented on DERBY-3431:
----------------------------------------

Was the previous comment meant for DERBY-1018?

Anyway, I think we might have to introduce a logical meta data object, because only a single
instance is being used per connection. If we don't add a wrapper class, references to the
physical connection itself or other logical connections will leak out to the user.

A wrapper object is not used in the embedded driver, but as far as I can see there is a bug
in the implementation. The bug causes connection references to "leak", in such a way that
user A with logical connection 1, at a later time (after connection 1 is closed) can obtain
a reference to logical connection 2 created by user B. I will log this bug tomorrow with a
repro.

> DatabaseMetaData.getConnection returns the wrong connection when using connection pooling
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3431
>                 URL: https://issues.apache.org/jira/browse/DERBY-3431
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.1.3.1, 10.2.2.0, 10.3.2.1, 10.4.0.0
>         Environment: Client-server with connection pooling enabled.
>            Reporter: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3431-1a-test_repro.diff
>
>
> The connection returned from DatabaseMetaData.getConnection is not the same as the connection
used to create the meta data object when the client driver is used with connection pooling
enabled.
> For trunk, the embedded driver/ds does the right thing.

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


Mime
View raw message