[
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_3.diff
Thanks Kathey. Yes, it will be great to have someone else look at the patch
too. I upload DERBY-2905_3.diff based on your comments.
In EmbeddedDataSourceFindDriver(), DriverManager.getDriver(url) is saved to
improve performance. Having finding driver in DataSource instead of every
connection could improve performance and oo design. Is there any other impact
to Derby system?
I tried to used _autoloadedDriver==null to handle
AutoloadedDriver.registerDriverModule smf
AutoloadedDriver.unregisterDriverModule. I am trouble by _driverModule not
being set at all the appropriate time causing some of the getConnection get
"not suitable driver" error either after Class.forName(url).newInstance(). I
suggest to keep the activeautoloadeddriver Boolean to remember the very first
time AutoloadedDriver is initiated and getting deregister from DriverManager.
The _autoloadedDriver is set to null in AutoloadedDriver.unregisterDriverModule.
In the test, the import of ClientDataSource is taking out and we test
unregisterDriverModule on Driver40, Driver30, and Driver20.
Suites.all and derbyall run clean. The code is ready to review. It will be nice
to see more review. I am writing the code for deregister attribute on shutdown
time.
> 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-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.