db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lily Wei (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-5043) Document the new url attribute deregister to keep the AutoloadedDriver registers in DriverManager
Date Tue, 01 Mar 2011 21:44:37 GMT

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

Lily Wei commented on DERBY-5043:
---------------------------------

Thank you so much for looking at this issue, Kim. Please see my comments:

1) The description at the top of DERBY-2905 says that after shutdown, the still-registered
driver "does not support any future loading of connections," but the reply to Rick just now
says that "When deregister=false, user can just obtain a new connection without issue Class.forName()."
I thought the point of making true the default was that after a shutdown the driver could
no longer be used, so it really needed to be deregistered. I admit I did not read the entire
history of DERBY-2905, where this might be clarified.
>>
In the life of DERBY-2905, the nature of the fixed version change a little bit. I can see
maybe I need two DERBY issues to address issue accordingly. 
It is true that when deregister=false, user can just obtain a new connection without issue
Class.forName().
However, when users shutdown Derby without specify deregister attribute, Derby will adopt
deregister=true and unload the auto loaded driver. For users to obtain a new connection after
that, they need to issue Class.forName() to avoid memory leak issue causing by having the
auto loaded driver hanging around. It implies there will be no still-registered driver. 
During the discussion of implementing DERBY-2905, I think that is the desire behavior for
Derby.

2) Is this attribute valid only when using JDBC 4.0 or 4.1? (Driver autoloading is present
with JDBC 4.0 but not with 3.0.)
Yes, the attribute is valid for JDBC 4.0 and 4.1

3) Does this attribute apply to the embedded driver only? Does it have any meaning if you
are shutting down the network driver?
The attribute is applied to embedded driver.


> Document the new url attribute deregister to keep the AutoloadedDriver registers in DriverManager
> -------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5043
>                 URL: https://issues.apache.org/jira/browse/DERBY-5043
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 10.7.1.1
>            Reporter: Lily Wei
>            Assignee: Kim Haase
>              Labels: derby_triage10_8
>             Fix For: 10.8.0.0
>
>         Attachments: Repro2905.java
>
>
> With DERBY-2905, we have a new connection url attribute - deregister. After a shutdown
of the embedded driver, the AutoloadedDriver is unregistered from the DriverManager. Users
who wish to keep the AutoloadedDriver can set the deregister attribute on the connection url
to false. It is only valid with shutdown=true. And, the default behavior with shutdown=true
is deregister=true. 
> For example: 
> 'shutdown=true;deregister=true" (It is okay not to specify deregister=true)
> 'shutdown=true;deregister=false"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message