You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/01/22 22:38:00 UTC

[jira] [Commented] (ARTEMIS-1058) Jars in web tmp dir locked on Windows

    [ https://issues.apache.org/jira/browse/ARTEMIS-1058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16749224#comment-16749224 ] 

ASF subversion and git services commented on ARTEMIS-1058:
----------------------------------------------------------

Commit ae00423034b6905564f6729f681dc8e29c86422e in activemq-artemis's branch refs/heads/master from Howard Gao
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=ae00423 ]

ARTEMIS-1058 Jars in web tmp dir locked on Windows

Because Sun's URLClassLoader never closes it's jar file handles
Jetty doesn't cleanup is temp web dir after Artemis broker shut
down normally on Windows.

To work around this a new process is forked before broker VM
exits to clean up the tmp dir if they are not deleted. The
new process out lives the main VM so that those jar's handles
are released and the temp dir can be cleaned up.


> Jars in web tmp dir locked on Windows
> -------------------------------------
>
>                 Key: ARTEMIS-1058
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1058
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 1.5.3
>         Environment: Windows 
>            Reporter: Howard Gao
>            Assignee: Howard Gao
>            Priority: Minor
>             Fix For: unscheduled
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The embedded jetty web server's WebAppClassloader holds up webapp's jar files and does not release them after close. For that reason the web app's temp dir cannot be cleaned up on Windows. (Other platforms like Linux doesn't prevent a force delete of files even they are not released).
> As long as this behavior exists we need to have a workaround to let
> the tmp dir be cleaned up.
> It is possible that we use a 'customized' classloader to replace jetty's
> WebAppClassloader, in which we manually iterate every JarFile resources
> and close them.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)