[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=195145=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-195145 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 06/Feb/19 15:04 Start Date: 06/Feb/19 15:04 Worklog Time Spent: 10m Work Description: asfgit commented on pull request #2534: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2534 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 195145) Time Spent: 2h 20m (was: 2h 10m) > 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: 2h 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=195134=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-195134 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 06/Feb/19 14:37 Start Date: 06/Feb/19 14:37 Worklog Time Spent: 10m Work Description: asfgit commented on pull request #2537: ARTEMIS-1058 Improving web temporary cleanup URL: https://github.com/apache/activemq-artemis/pull/2537 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 195134) Time Spent: 2h 10m (was: 2h) > 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: 2h 10m > 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=194774=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-194774 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 05/Feb/19 19:43 Start Date: 05/Feb/19 19:43 Worklog Time Spent: 10m Work Description: clebertsuconic commented on issue #2534: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2534#issuecomment-460776232 @gaohoward Please check #2537 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 194774) Time Spent: 2h (was: 1h 50m) > 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: 2h > 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=194215=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-194215 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 04/Feb/19 19:57 Start Date: 04/Feb/19 19:57 Worklog Time Spent: 10m Work Description: clebertsuconic commented on pull request #2537: ARTEMIS-1058 Improving web temporary cleanup URL: https://github.com/apache/activemq-artemis/pull/2537 * Using SpawnedVMSupport (used to be on testsuite, moving it to Utils) * Building the classpath for ./lib, similar to what happens on Bootstrap * Using Path as much as possible to avoid issues encoding files This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 194215) Time Spent: 1h 50m (was: 1h 40m) > 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: 1h 50m > 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=193241=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-193241 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 01/Feb/19 07:25 Start Date: 01/Feb/19 07:25 Worklog Time Spent: 10m Work Description: gaohoward commented on issue #2534: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2534#issuecomment-459631440 @clebertsuconic I'm not aware of the "encoded" issue, where can I get more information about it? The first commit is to avoid a temp file not being removed. This commit is to make sure Artemis as a windows service will get gracefully shutdown so the 'cleanup' code from first commit gets called. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 193241) Time Spent: 1h 40m (was: 1.5h) > 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: 1h 40m > 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=193209=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-193209 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 01/Feb/19 04:30 Start Date: 01/Feb/19 04:30 Worklog Time Spent: 10m Work Description: clebertsuconic commented on issue #2534: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2534#issuecomment-459602236 I believe there is an issue with the original commit with encoded strings. I believe you should use a file and some method for encode I though this commit was to avoid the situation where a temp file is not removed. We still need to fix the original commit then. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 193209) Time Spent: 1.5h (was: 1h 20m) > 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: 1.5h > 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=193195=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-193195 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 01/Feb/19 03:01 Start Date: 01/Feb/19 03:01 Worklog Time Spent: 10m Work Description: gaohoward commented on issue #2534: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2534#issuecomment-459588365 @clebertsuconic The commit ae00423 was valid. However on Windows when running artemis as a service, stopping the service simply kills the process, So the shutdown hook won't get called and the clean up code never get executed. This commit just fixes this. According to this doc: https://github.com/kohsuke/winsw/blob/master/doc/xmlConfigFile.md The executable is used for starting a service, not startexecutable. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 193195) Time Spent: 1h 20m (was: 1h 10m) > 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: 1h 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=193194=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-193194 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 01/Feb/19 03:00 Start Date: 01/Feb/19 03:00 Worklog Time Spent: 10m Work Description: gaohoward commented on issue #2534: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2534#issuecomment-459588365 @clebertsuconic The commit ae00423 was valid. However on Windows when running artemis as a service, stopping the service simply kills the process, So the shutdown hook won't get called and the clean up code never get executed. This commit just fixes this. According to this doc: https://github.com/kohsuke/winsw/blob/master/doc/xmlConfigFile.md The is used for starting a service, not . This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 193194) Time Spent: 1h 10m (was: 1h) > 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: 1h 10m > 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=192903=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-192903 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 31/Jan/19 15:49 Start Date: 31/Jan/19 15:49 Worklog Time Spent: 10m Work Description: clebertsuconic commented on pull request #2534: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2534#discussion_r252722752 ## File path: artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml ## @@ -33,39 +33,58 @@ roll %JAVA_HOME%\bin\java.exe Review comment: don't you need to change this to startexecutable? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 192903) Time Spent: 1h (was: 50m) > 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: 1h > 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=192901=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-192901 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 31/Jan/19 15:49 Start Date: 31/Jan/19 15:49 Worklog Time Spent: 10m Work Description: clebertsuconic commented on issue #2534: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2534#issuecomment-459394318 The problem is only on windows service? On this case, we could revert ae00423034b6905564f6729f681dc8e29c86422e after this commit? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 192901) Time Spent: 50m (was: 40m) > 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: 50m > 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=192871=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-192871 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 31/Jan/19 14:48 Start Date: 31/Jan/19 14:48 Worklog Time Spent: 10m Work Description: gaohoward commented on pull request #2534: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2534 This is the second commit. It improves the windows service configuration file so that the service can be shutdown gracefully (clean shutdown) and allow for a chance to clean up the web tmp dir. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 192871) Time Spent: 40m (was: 0.5h) > 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: 40m > 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=188520=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-188520 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 22/Jan/19 22:37 Start Date: 22/Jan/19 22:37 Worklog Time Spent: 10m Work Description: asfgit commented on pull request #2473: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2473 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 188520) Time Spent: 0.5h (was: 20m) > 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: 0.5h > 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=186680=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-186680 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 18/Jan/19 02:31 Start Date: 18/Jan/19 02:31 Worklog Time Spent: 10m Work Description: gaohoward commented on pull request #2473: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2473#discussion_r248910611 ## File path: artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java ## @@ -237,28 +236,39 @@ public void start() throws Exception { public void internalStop() throws Exception { server.stop(); if (webContexts != null) { + File tmpdir = null; + StringBuilder strBuilder = new StringBuilder(); + boolean found = false; for (WebAppContext context : webContexts) { tmpdir = context.getTempDirectory(); -if (tmpdir != null && !context.isPersistTempDirectory()) { +if (tmpdir != null && tmpdir.exists() && !context.isPersistTempDirectory()) { //tmpdir will be removed by deleteOnExit() - //somehow when broker is stopped and restarted quickly - //this tmpdir won't get deleted sometimes - boolean fileDeleted = TimeUtils.waitOnBoolean(false, 5000, tmpdir::exists); - - if (!fileDeleted) { - //because the execution order of shutdown hooks are - //not determined, so it's possible that the deleteOnExit - //is executed after this hook, in that case we force a delete. - FileUtil.deleteDirectory(tmpdir); - logger.debug("Force to delete temporary file on shutdown: " + tmpdir.getAbsolutePath()); - if (tmpdir.exists()) { - ActiveMQWebLogger.LOGGER.tmpFileNotDeleted(tmpdir); - } + //However because the URLClassLoader never release/close its opened + //jars the jar file won't be able to get deleted on Windows platform + //until after the process fully terminated. To fix this here arranges + //a separate process to try clean up the temp dir + FileUtil.deleteDirectory(tmpdir); + if (tmpdir.exists()) { + ActiveMQWebLogger.LOGGER.tmpFileNotDeleted(tmpdir); + strBuilder.append(tmpdir); + strBuilder.append(","); + found = true; } } } + + if (found) { +String artemisHome = System.getProperty("artemis.home"); Review comment: ah ok. I'll use the parameter. thx. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 186680) Time Spent: 20m (was: 10m) > 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)
[jira] [Work logged] (ARTEMIS-1058) Jars in web tmp dir locked on Windows
[ https://issues.apache.org/jira/browse/ARTEMIS-1058?focusedWorklogId=186358=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-186358 ] ASF GitHub Bot logged work on ARTEMIS-1058: --- Author: ASF GitHub Bot Created on: 17/Jan/19 15:44 Start Date: 17/Jan/19 15:44 Worklog Time Spent: 10m Work Description: clebertsuconic commented on pull request #2473: ARTEMIS-1058 Jars in web tmp dir locked on Windows URL: https://github.com/apache/activemq-artemis/pull/2473#discussion_r248722829 ## File path: artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java ## @@ -237,28 +236,39 @@ public void start() throws Exception { public void internalStop() throws Exception { server.stop(); if (webContexts != null) { + File tmpdir = null; + StringBuilder strBuilder = new StringBuilder(); + boolean found = false; for (WebAppContext context : webContexts) { tmpdir = context.getTempDirectory(); -if (tmpdir != null && !context.isPersistTempDirectory()) { +if (tmpdir != null && tmpdir.exists() && !context.isPersistTempDirectory()) { //tmpdir will be removed by deleteOnExit() - //somehow when broker is stopped and restarted quickly - //this tmpdir won't get deleted sometimes - boolean fileDeleted = TimeUtils.waitOnBoolean(false, 5000, tmpdir::exists); - - if (!fileDeleted) { - //because the execution order of shutdown hooks are - //not determined, so it's possible that the deleteOnExit - //is executed after this hook, in that case we force a delete. - FileUtil.deleteDirectory(tmpdir); - logger.debug("Force to delete temporary file on shutdown: " + tmpdir.getAbsolutePath()); - if (tmpdir.exists()) { - ActiveMQWebLogger.LOGGER.tmpFileNotDeleted(tmpdir); - } + //However because the URLClassLoader never release/close its opened + //jars the jar file won't be able to get deleted on Windows platform + //until after the process fully terminated. To fix this here arranges + //a separate process to try clean up the temp dir + FileUtil.deleteDirectory(tmpdir); + if (tmpdir.exists()) { + ActiveMQWebLogger.LOGGER.tmpFileNotDeleted(tmpdir); + strBuilder.append(tmpdir); + strBuilder.append(","); + found = true; } } } + + if (found) { +String artemisHome = System.getProperty("artemis.home"); Review comment: you're wrong actually, WebServerComponent is getting the artemisInstance and artemisHome as parameters. It is important you don't use the variable here as you may break embedded cases. We use things like this on our testsuite as well. so, you can use a property to store what's passed from the configure method, and use the variable directly here instead. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 186358) Time Spent: 10m Remaining Estimate: 0h > 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: 10m > 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)