You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Roman Puchkovskiy (JIRA)" <ji...@apache.org> on 2008/05/31 20:25:45 UTC

[jira] Created: (JCR-1636) Make shutdown hooks in TransientFileFactory removable

Make shutdown hooks in TransientFileFactory removable
-----------------------------------------------------

                 Key: JCR-1636
                 URL: https://issues.apache.org/jira/browse/JCR-1636
             Project: Jackrabbit
          Issue Type: Improvement
          Components: jackrabbit-jcr-commons
    Affects Versions: commons 1.4.2, 1.4
            Reporter: Roman Puchkovskiy


TransientFileFactory class always registers shutdown hook. So, if jackrabbit classes were loaded by web-app classloader, they will not be released when web-app is undeployed (if jackrabbit-jcr-commons JAR is inside WAR). This causes classloader leak.
It seems to be useful to have ability to cancel TransientFileFactory's shutdown hook when application is going to be unloaded to avoid classloader leak.

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


[jira] Reopened: (JCR-1636) Make shutdown hooks in TransientFileFactory removable

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

Roman Puchkovskiy reopened JCR-1636:
------------------------------------


I'm not sure is it correct to reopen the issue, but it turned out that the supplied patch breaks class unloading in some cases. I'm going to attach a patch which stops the reaper thread too, so no problems arise because of it.

> Make shutdown hooks in TransientFileFactory removable
> -----------------------------------------------------
>
>                 Key: JCR-1636
>                 URL: https://issues.apache.org/jira/browse/JCR-1636
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 1.4, commons 1.4.2
>            Reporter: Roman Puchkovskiy
>             Fix For: 1.5
>
>         Attachments: JCR-1636-workaround.patch
>
>
> TransientFileFactory class always registers shutdown hook. So, if jackrabbit classes were loaded by web-app classloader, they will not be released when web-app is undeployed (if jackrabbit-jcr-commons JAR is inside WAR). This causes classloader leak.
> It seems to be useful to have ability to cancel TransientFileFactory's shutdown hook when application is going to be unloaded to avoid classloader leak.

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


[jira] Updated: (JCR-1636) Make shutdown hooks in TransientFileFactory removable

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

Roman Puchkovskiy updated JCR-1636:
-----------------------------------

    Attachment: JCR-1636-workaround.patch

Attaching a workaround patch. It adds a static method which executes same actions as shutdown hook does and unregisters shutdown hook.

> Make shutdown hooks in TransientFileFactory removable
> -----------------------------------------------------
>
>                 Key: JCR-1636
>                 URL: https://issues.apache.org/jira/browse/JCR-1636
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 1.4, commons 1.4.2
>            Reporter: Roman Puchkovskiy
>         Attachments: JCR-1636-workaround.patch
>
>
> TransientFileFactory class always registers shutdown hook. So, if jackrabbit classes were loaded by web-app classloader, they will not be released when web-app is undeployed (if jackrabbit-jcr-commons JAR is inside WAR). This causes classloader leak.
> It seems to be useful to have ability to cancel TransientFileFactory's shutdown hook when application is going to be unloaded to avoid classloader leak.

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


[jira] Resolved: (JCR-1636) Make shutdown hooks in TransientFileFactory removable

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

Stefan Guggisberg resolved JCR-1636.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5

applied patch in svn r663634.

thanks!

> Make shutdown hooks in TransientFileFactory removable
> -----------------------------------------------------
>
>                 Key: JCR-1636
>                 URL: https://issues.apache.org/jira/browse/JCR-1636
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 1.4, commons 1.4.2
>            Reporter: Roman Puchkovskiy
>             Fix For: 1.5
>
>         Attachments: JCR-1636-workaround.patch
>
>
> TransientFileFactory class always registers shutdown hook. So, if jackrabbit classes were loaded by web-app classloader, they will not be released when web-app is undeployed (if jackrabbit-jcr-commons JAR is inside WAR). This causes classloader leak.
> It seems to be useful to have ability to cancel TransientFileFactory's shutdown hook when application is going to be unloaded to avoid classloader leak.

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


[jira] Closed: (JCR-1636) Make shutdown hooks in TransientFileFactory removable

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

Alexander Klimetschek closed JCR-1636.
--------------------------------------

    Resolution: Fixed

Once a patch is applied to svn and the bug is closed, it is better to create another issue instead of re-opening. You can link to this bug with "relates to" to connect the dots. The new JCR-1668 you created is a good fit - I created the link and close this bug, could you upload your patch to the other issue and provide the comments (so they are coming directly from you and not from me)?

> Make shutdown hooks in TransientFileFactory removable
> -----------------------------------------------------
>
>                 Key: JCR-1636
>                 URL: https://issues.apache.org/jira/browse/JCR-1636
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 1.4, commons 1.4.2
>            Reporter: Roman Puchkovskiy
>             Fix For: 1.5
>
>         Attachments: JCR-1636-reaper-thread.patch, JCR-1636-workaround.patch
>
>
> TransientFileFactory class always registers shutdown hook. So, if jackrabbit classes were loaded by web-app classloader, they will not be released when web-app is undeployed (if jackrabbit-jcr-commons JAR is inside WAR). This causes classloader leak.
> It seems to be useful to have ability to cancel TransientFileFactory's shutdown hook when application is going to be unloaded to avoid classloader leak.

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


[jira] Updated: (JCR-1636) Make shutdown hooks in TransientFileFactory removable

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

Roman Puchkovskiy updated JCR-1636:
-----------------------------------

    Attachment: JCR-1636-reaper-thread.patch

This patch stops the ReaperThread on shutdown too.

> Make shutdown hooks in TransientFileFactory removable
> -----------------------------------------------------
>
>                 Key: JCR-1636
>                 URL: https://issues.apache.org/jira/browse/JCR-1636
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-jcr-commons
>    Affects Versions: 1.4, commons 1.4.2
>            Reporter: Roman Puchkovskiy
>             Fix For: 1.5
>
>         Attachments: JCR-1636-reaper-thread.patch, JCR-1636-workaround.patch
>
>
> TransientFileFactory class always registers shutdown hook. So, if jackrabbit classes were loaded by web-app classloader, they will not be released when web-app is undeployed (if jackrabbit-jcr-commons JAR is inside WAR). This causes classloader leak.
> It seems to be useful to have ability to cancel TransientFileFactory's shutdown hook when application is going to be unloaded to avoid classloader leak.

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