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] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.
Date Thu, 10 Feb 2011 14:39:57 GMT

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

Lily Wei updated DERBY-2905:
----------------------------

    Attachment: DERBY-2905_part2_2_3.diff

Thanks Knut. You are right, the test does behave differently when the driver has been loaded
and shutdown has been issued before the test starts. When we first start embedded engine,
AutoloadedDriver40 is created by Derby and loaded in DriverManager. With the current code,
reloading engine after shutdown via for.ClassName(…).newInstance will result AutoloadedDriver
loaded in DriverManager. Jdbc4.Driver40Test and jdbcapi.DriverTest both assume AutoloadedDriver40
is in DriverManager when JDBC.vmSupportsJDBC4() is true. I am attaching DERBY-2905_part2_2_3.diff
patch. This patch assumes the current AutoloadedDriver.registerDriverModule() behavior is
correct. If this is not a correct assumption, please feel free to change the code. I did run
jdbc4._Suite and jdbcapi._Suite and they are passing on my machine.  Please review the code.
If it is okay with everybody, I can check-in when I get home. I am currently in HongKong airport.
Happy Chinese New Year.

> 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: 10.2.2.0, 10.3.1.4, 10.4.1.3
>            Reporter: Daniel John Debrunner
>            Assignee: Lily Wei
>         Attachments: DERBY-2905-2.diff, DERBY-2905_1.diff, DERBY-2905_3.diff, DERBY-2905_part2_1.diff,
DERBY-2905_part2_2.diff, DERBY-2905_part2_2_1.diff, DERBY-2905_part2_2_2.diff, DERBY-2905_part2_2_3.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, ww.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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message