db-derby-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: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.
Date Wed, 12 Jan 2011 17:17:47 GMT

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

Kathey Marsden commented on DERBY-2905:

I think shutdown=true with no database specified should shutdown the entire system and deregister
the driver as documented.

I have seen quite a few cases with memory leaks because Derby is loaded in multiple class
loaders and leaking because the shutdown is not performed in the same classloader context
as the boot and those applications needed to be changed to make sure the shutdown occurred
in the proper loader.   I don't think it is good to add an additional step as all those applications
that have made this change would need to add the additional step and their leaks might reoccur
upon upgrade of Derby and the JVM as long as this bug exists.

Perhaps the new API should be to shutdown while keeping the autoloaded driver. Perhaps a new
or modified attribute. I am not very good with names but something like, deregister=<true|false>
(only valid with shutdown)  and have it default to true.

> Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered
in the DriverManager.
> ------------------------------------------------------------------------------------------------------------------
>                 Key: DERBY-2905
>                 URL: https://issues.apache.org/jira/browse/DERBY-2905
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions:,,
>            Reporter: Daniel John Debrunner
>            Assignee: Lily Wei
>         Attachments: DERBY-2905_1.diff, DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff,
DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.java, Repro2905.java
> After a shutdown of the embedded driver the AutoloadDriver is not unregistered from DriverManager.
However it does not support any future loading of connections so it has no value in remaining
registered. Since the DriverManager class will remain forever, this means the Derby code will
remain forever in the JVM, even if Derby was loaded by a separate class loader.
> Regression from 10.1 since before the AutoloadedDriver the internal driver did unregister
itself from the DriverManager on a shutdown.

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

View raw message