[
https://issues.apache.org/jira/browse/ARTEMIS-1058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16725106#comment-16725106
]
ASF GitHub Bot commented on ARTEMIS-1058:
-----------------------------------------
GitHub user gaohoward opened a pull request:
https://github.com/apache/activemq-artemis/pull/2473
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.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gaohoward/activemq-artemis b_522
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/2473.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2473
----
commit af27cc96555390ec63d35e9c157aa658bde60797
Author: Howard Gao <howard.gao@...>
Date: 2018-12-19T14:54:59Z
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
>
>
> 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)