You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <ji...@apache.org> on 2007/07/06 00:33:04 UTC

[jira] Created: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

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.0.0, 10.3.1.0, 10.4.0.0
            Reporter: Daniel John Debrunner


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.


[jira] Commented: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524853 ] 

Daniel John Debrunner commented on DERBY-2905:
----------------------------------------------

I working on committing this patch.

> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.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.


[jira] Commented: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519054 ] 

Daniel John Debrunner commented on DERBY-2905:
----------------------------------------------

Patch looks good. Adding a test case to jdbcapi.AutoloadTest would be good.

> 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.0.0, 10.3.1.0, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, Main.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.


[jira] Commented: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543127 ] 

Dyre Tjeldvoll commented on DERBY-2905:
---------------------------------------

The last comment seems pretty close to a "-1" for the patch. If that is true, perhaps it would be good to remove 'Patch available' for the time being, at least?

> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.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.


[jira] Commented: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520295 ] 

Mamta A. Satoor commented on DERBY-2905:
----------------------------------------

Ramin, your patch looks good. I noticed though that for the new entry (JDBC_DRIVER_UNREGISTER_ERROR) in MessageId.java, there was no corresponding error text message entry in org.apache.derby.loc:messages.xml

> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, Main.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.


[jira] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramin Moazeni updated DERBY-2905:
---------------------------------

    Attachment: DERBY-2905v0.stat
                DERBY-2905v0.diff

Attaching an interim patch for this issue.
The AutoloadedDriver is now unregistering itself from DriverManager
as follows:
** Check for Autoloaded driver before DB shutdown
- Testing with org.apache.derby.jdbc.EmbeddedDriver
- Getting Registered Drivers
        sun.jdbc.odbc.JdbcOdbcDriver
        org.apache.derby.jdbc.ClientDriver
        org.apache.derby.jdbc.AutoloadedDriver
- Shutting Down Database
        Database shut down normally

** Check for Autoloaded driver after DB shutdown
- Getting Registered Drivers
        sun.jdbc.odbc.JdbcOdbcDriver
        org.apache.derby.jdbc.ClientDriver


I appreciate your comments/review.

Thanks
Ramin

> 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.0.0, 10.3.1.0, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, Main.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.


[jira] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramin Moazeni updated DERBY-2905:
---------------------------------

    Attachment: Mainv1.java

Hello Dan,

Yes, the v0 patch was simpler however, I noticed that it has some problems.
Please consider the following scenario:
1) The DB is shut down and therefore, the Autoloaded driver is
unregistered.
2) The user tries to explicitly load the Embedded driver using
Class.forName(..).newInstance()

With v0 patch, the user couldn't load the Embedded driver explicitly after
the DB shutdown and I was getting the "No Suitable Driver" error.

I think the problem was that the DriverManager.registerDriver() was being
called in a static block and therefore it was called only once to load the
AutoloadedDriver. With the changes in v1 patch, the user can explicitly load the Embedded
driver after the DB shutdown and after the Autoloaded driver is being
unregistered. The AutoloadedDriver.registerDriverModule(...) takes care of registering the
driver when the user is explicitly loading the Embedded driver.

I am attaching a testcase with this issue. If you apply the v0 patch and run the
testcase, you will see the behavior I am explaining above.

Thanks
Ramin


> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, Main.java, Mainv1.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.


[jira] Commented: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520385 ] 

Daniel John Debrunner commented on DERBY-2905:
----------------------------------------------

The first patch was simple, just adding a deregister of the driver.

The new patch (v1) does a lot more, can you please explain what is going on?

> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, Main.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.


[jira] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-2905:
----------------------------------

    Derby Categories: [High Value Fix]

Ramin, are you still working on this issue. It would be good to unassign yourself if you are not.


> 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: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.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.


[jira] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramin Moazeni updated DERBY-2905:
---------------------------------

    Attachment: Main.java

Attaching a reproducible test case with this issue.
As mentioned in the description, the AutoloadedDriver is not unregistered 
from the DriverManager. The attached test case shows the behavior as 
follows:

 ** Check for Autoloaded driver before DB shutdown
- Testing with org.apache.derby.jdbc.EmbeddedDriver
- Getting Registered Drivers
        sun.jdbc.odbc.JdbcOdbcDriver
        org.apache.derby.jdbc.AutoloadedDriver
        org.apache.derby.jdbc.ClientDriver
- Shutting Down Database
        Database shut down normally

** Check for Autoloaded driver after DB shutdown
- Getting Registered Drivers
        sun.jdbc.odbc.JdbcOdbcDriver
        org.apache.derby.jdbc.AutoloadedDriver
        org.apache.derby.jdbc.ClientDriver

in 10.1, the above test case shows Driver30 successfully unregistering after 
database shutdown:
** Check for Autoloaded driver before DB shutdown
- Testing with org.apache.derby.jdbc.EmbeddedDriver
- Getting Registered Drivers
        org.apache.derby.jdbc.Driver30
- Shutting Down Database
        Database shut down normally

** Check for Autoloaded driver after DB shutdown
- Getting Registered Drivers


> 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.0.0, 10.3.1.0, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: Main.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.


[jira] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-2905:
----------------------------------

    Urgency: Urgent

marking urgent since this is a regression.

> 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.0.0, 10.3.1.0, 10.4.0.0
>            Reporter: Daniel John Debrunner
>
> 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.


[jira] Commented: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524897 ] 

Daniel John Debrunner commented on DERBY-2905:
----------------------------------------------

I reworked the test cases in the v3 patch into AutoLoadTest.java and committed them with revision 572822.
Main changes were:
  don't add an unused method
  split the test cases into two fixtures & reuse some existing code for reloading the embedded driver.
  don't assume JDBC 4
  

> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.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.


[jira] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-2905:
---------------------------------

    Urgency: Normal  (was: Urgent)

Reverting this issue to normal urgency. This issue occurs in 10.2. I do not believe that this old issue should block the incremental release of other quality improvements.

> 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.0.0, 10.3.1.0, 10.4.0.0
>            Reporter: Daniel John Debrunner
>
> 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.


[jira] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-2905:
----------------------------------

    Derby Info: [Regression]  (was: [Regression, Patch Available])

> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.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.


[jira] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramin Moazeni updated DERBY-2905:
---------------------------------

    Attachment: DERBY-2905v3.stat
                DERBY-2905v3.diff

Thanks Mamta for your review. I am attaching the v3 patch 
addressing your review comments.
I ran derbyall and suites.All without any errors.

Thanks
Ramin

> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.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.


[jira] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-2905:
---------------------------------

    Issue & fix info: [High Value Fix]

> 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
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.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.


[jira] Commented: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537404 ] 

Daniel John Debrunner commented on DERBY-2905:
----------------------------------------------

I think the patch results in code that is brittle, it adds more state about the boot state of the class when it already has a couple of fields trying to manage state.

In addition its seems the registering of Derby's embedded driver has become overly complex, some due in part to previous changes, also I think the patch means that the autoloaded driver gets re-used on a re-boot which doesn't seem the right life-cycle for java.sql.Driver.

I did try thinking about an alternate approach, more in-line with the original code (pre-JDBC 4 autoload) changes where a driver registers itself only, but I then got distracted by other stuff.

> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.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.


[jira] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-2905:
----------------------------------

    Derby Info: [Patch Available, Regression]  (was: [Regression])

Marking patch available so we hopefully get some comments on this patch.


> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.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.


[jira] Commented: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12533120 ] 

Kathey Marsden commented on DERBY-2905:
---------------------------------------

On Sept 4, Dan said
>I working on committing this patch.

Dan, could you give us an update on your review of this issue?  Are there changes needed to the patch?


> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.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.


[jira] Assigned: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramin Moazeni reassigned DERBY-2905:
------------------------------------

    Assignee:     (was: Ramin Moazeni)

> 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
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, DERBY-2905v3.diff, DERBY-2905v3.stat, Main.java, Mainv1.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.


[jira] Assigned: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramin Moazeni reassigned DERBY-2905:
------------------------------------

    Assignee: Ramin Moazeni

> 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.0.0, 10.3.1.0, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>
> 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.


[jira] Updated: (DERBY-2905) Shutting down embedded Derby does not remove all code, the AutoloadDriver is left registered in the DriverManager.

Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramin Moazeni updated DERBY-2905:
---------------------------------

    Attachment: DERBY-2905v1.stat
                DERBY-2905v1.diff

Thanks dan for your review.
I am attaching another patch for this issue. I appreciate
your comments/review.

Thanks
Ramin

> 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.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2905v0.diff, DERBY-2905v0.stat, DERBY-2905v1.diff, DERBY-2905v1.stat, Main.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.