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

2019-02-12 Thread ASF subversion and git services (JIRA)


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

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

Commit 3a25748936d27937000c50c67281cb03d719c2f1 in activemq-artemis's branch 
refs/heads/2.6.x from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=3a25748 ]

ARTEMIS-1058 Fixing testsuite

Possible NPE that will happen on ReplicatedFailoverTest only

(cherry picked from commit b80a78d885e2568af41fc133b0185399385eda0c)


> 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] [Commented] (ARTEMIS-1058) Jars in web tmp dir locked on Windows

2019-02-12 Thread ASF subversion and git services (JIRA)


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

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

Commit b80a78d885e2568af41fc133b0185399385eda0c in activemq-artemis's branch 
refs/heads/master from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=b80a78d ]

ARTEMIS-1058 Fixing testsuite

Possible NPE that will happen on ReplicatedFailoverTest only


> 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] [Commented] (ARTEMIS-1058) Jars in web tmp dir locked on Windows

2019-02-06 Thread ASF subversion and git services (JIRA)


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

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

Commit 9c06d4b8b6c0a62283139fa6d98f9ce6aa55de4e in activemq-artemis's branch 
refs/heads/master from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=9c06d4b ]

ARTEMIS-1058 Fixing checkstyle


> 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] [Commented] (ARTEMIS-1058) Jars in web tmp dir locked on Windows

2019-02-06 Thread ASF subversion and git services (JIRA)


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

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

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

ARTEMIS-1058 Jars in web tmp dir locked on Windows

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.


> 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] [Commented] (ARTEMIS-1058) Jars in web tmp dir locked on Windows

2019-02-06 Thread ASF subversion and git services (JIRA)


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

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

Commit 912f3edbb92feafb79da4ed3ddc0bc4952935f67 in activemq-artemis's branch 
refs/heads/2.6.x from Howard Gao
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=912f3ed ]

ARTEMIS-1058 Jars in web tmp dir locked on Windows

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.

(cherry picked from commit d29b70b9961f50a4c64ba10672d977127e4123b7)


> 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] [Commented] (ARTEMIS-1058) Jars in web tmp dir locked on Windows

2019-02-06 Thread ASF subversion and git services (JIRA)


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

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

Commit 3ee6699a0ea576975b78f0248fe061d26296805b in activemq-artemis's branch 
refs/heads/2.6.x from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=3ee6699 ]

ARTEMIS-1058 Improving web temporary cleanup

* 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

(cherry picked from commit 59ada6603354f766dc627a83813af8fd69bab1fd)


> 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] [Commented] (ARTEMIS-1058) Jars in web tmp dir locked on Windows

2019-02-06 Thread ASF subversion and git services (JIRA)


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

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

Commit 59ada6603354f766dc627a83813af8fd69bab1fd in activemq-artemis's branch 
refs/heads/master from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=59ada66 ]

ARTEMIS-1058 Improving web temporary cleanup

* 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


> 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] [Commented] (ARTEMIS-1058) Jars in web tmp dir locked on Windows

2019-01-22 Thread ASF subversion and git services (JIRA)


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

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

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

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.

(cherry picked from commit ae00423034b6905564f6729f681dc8e29c86422e)


> 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] [Commented] (ARTEMIS-1058) Jars in web tmp dir locked on Windows

2019-01-22 Thread ASF subversion and git services (JIRA)


[ 
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)


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

2018-12-19 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2473#discussion_r243139995
  
--- Diff: 
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");
--- End diff --

This "artemis.home" property is not defined in configured in broker.xml 
file. It's only defined in artemis.profile and set to system property in 
artemis.cmd script (-Dartemis.home="$ARTEMIS_HOME")
I can't get it from the other configurations.



> 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)


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

2018-12-19 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user clebertsuconic commented on a diff in the pull request:

https://github.com/apache/activemq-artemis/pull/2473#discussion_r243083234
  
--- Diff: 
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");
--- End diff --

can't you get the property from other means? Fileconfiguration for instance?


> 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)


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

2018-12-19 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/2473
  
Yes there is a issue opened. 
https://github.com/eclipse/jetty.project/issues/1425
that doesn't get fixed (PR didn't merged because the hacking into 
URLClassLoader brings concerns)
So that's why i came up with this work around.
(The issue still there with jetty latest releases).


> 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)


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

2018-12-19 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user jbertram commented on the issue:

https://github.com/apache/activemq-artemis/pull/2473
  
Wasn't there a Jetty issue opened about this? If so, how was that resolved?


> 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)


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

2018-12-19 Thread ASF GitHub Bot (JIRA)


[ 
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 
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)


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

2018-12-19 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/2473
  
manually tested on Windows 7 64bit and Windows 10 64bit.


> 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)


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

2017-05-25 Thread Howard Gao (JIRA)

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

Howard Gao commented on ARTEMIS-1058:
-

Clebert this is what I've been doing, i.e. cooperating with jetty guys to get 
my fix in. When that's done I'll update the jetty version.



> 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: 1.5.6, 2.2.0
>
>
> 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
(v6.3.15#6346)


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

2017-05-25 Thread clebert suconic (JIRA)

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

clebert suconic commented on ARTEMIS-1058:
--

[~gaohoward] what I meant to ask was... shouldn't you update Jetty to a version 
where this doesn't happen? can you help to fix the issue at Jetty as they asked 
to on that github issue?

> 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: 1.5.6, 2.2.0
>
>
> 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
(v6.3.15#6346)


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

2017-05-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@clebertsuconic ok I'll update the version on the Jira.


> 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: 2.2.0
>
>
> 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
(v6.3.15#6346)


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

2017-05-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
I thought you would update to a version fixing it. 


> 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: 2.2.0
>
>
> 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
(v6.3.15#6346)


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

2017-05-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward closed the pull request at:

https://github.com/apache/activemq-artemis/pull/1125


> 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: 2.2.0
>
>
> 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
(v6.3.15#6346)


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

2017-05-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@clebertsuconic I'll close this because the fix won't be in Artemis.


> 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: 2.2.0
>
>
> 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
(v6.3.15#6346)


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

2017-05-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@gaohoward  you need to either fix this or close this!


> 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: 2.2.0
>
>
> 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
(v6.3.15#6346)


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

2017-05-09 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@gaohoward  any updates? 


> 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: 2.2.0
>
>
> 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
(v6.3.15#6346)


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

2017-04-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
ok, I'll test. Thanks.


> 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: 2.next
>
>
> 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
(v6.3.15#6346)


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

2017-04-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user mtaylor commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@howardgao  Hey Howard, I noticed one of the developers from Jetty got back 
to you with a modified Jetty version to test on Windows.  Can you confirm if 
this resolves your problem?  It'd be good to give the Jetty devs some feedback 
so they can get the issue fixed and incorporated into an upcoming version.




> 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: 2.next
>
>
> 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
(v6.3.15#6346)


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

2017-04-06 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@gaohoward  can you check this? there's an update on the ticket you opened.


> 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: 2.next
>
>
> 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
(v6.3.15#6346)


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

2017-03-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@clebertsuconic I submitted an issue and giving a simple test case.

https://github.com/eclipse/jetty.project/issues/1425



> 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: 2.0.0
>
>
> 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
(v6.3.15#6346)


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

2017-03-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@clebertsuconic  will do.


> 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: 2.0.0
>
>
> 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
(v6.3.15#6346)


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

2017-03-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@gaohoward  I mean, i would rather have it fixed in jetty, or find the 
proper config for it.


> 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: 2.0.0
>
>
> 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
(v6.3.15#6346)


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

2017-03-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@gaohoward can you reach Jetty community and ask for help? maybe raise a 
bug there after a discussion...

Can you point a link here to whatever discussion you open on Jetty?


> 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: 2.0.0
>
>
> 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
(v6.3.15#6346)


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

2017-03-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
no the test only pass on Linux. On windows it fails (without the fix).
I'm ok with dropping the test too. (It's a simple test anyway, we can add 
whenever we want).


> 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: 2.0.0
>
>
> 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
(v6.3.15#6346)


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

2017-03-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@gaohoward the test will pass?

I don't want any more noise on the testsuite :) .. .we have enough ignored 
tests.


> 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: 2.0.0
>
>
> 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
(v6.3.15#6346)


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

2017-03-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@clebertsuconic I'm fine with that. However we should keep the test.


> 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: 2.0.0
>
>
> 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
(v6.3.15#6346)


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

2017-03-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@gaohoward I would rather keep this unfixed.. and raise an issue to Jetty, 
than writing a customizeable classLoader. .that will be unmaintainable..  it's 
out of our scope IMO.


> 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: 2.0.0
>
>
> 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
(v6.3.15#6346)


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

2017-03-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user gaohoward commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
@clebertsuconic  I don't think this is the case. All files except Jar files 
in web-inf/lib can be deleted automatically. This is because the classloader 
didn't release the inputstream on Jar files, it relies on GC to close the 
streams, which you never be sure when to happen. 


> 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: 2.0.0
>
>
> 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
(v6.3.15#6346)


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

2017-03-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

Github user clebertsuconic commented on the issue:

https://github.com/apache/activemq-artemis/pull/1125
  
Some googling: 
https://wiki.eclipse.org/Jetty/Howto/Deal_with_Locked_Windows_Files


> 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: 2.0.0
>
>
> 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
(v6.3.15#6346)


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

2017-03-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on ARTEMIS-1058:
-

GitHub user gaohoward opened a pull request:

https://github.com/apache/activemq-artemis/pull/1125

ARTEMIS-1058 Jars in web tmp dir locked on Windows

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.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/gaohoward/activemq-artemis master_jetty

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/activemq-artemis/pull/1125.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 #1125


commit 1c85570d926ce1a51a34523eadab9e1714a498f2
Author: Howard Gao 
Date:   2017-03-23T13:45:12Z

ARTEMIS-1058 Jars in web tmp dir locked on Windows

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.




> 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: 2.0.0
>
>
> 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
(v6.3.15#6346)