I am using
- Maven 1.6
- Java 1.14
- NetBeans 11.3
thread Thread[HttpClient-1-Worker-0,5,org.sonatype.mavenbook.ch07.simple.weather.oauth.lone.WeatherYdnJava] was interrupted but is still alive after waiting at least 14997msecs
thread Thread[HttpClient-1-Worker-0,5,org.sonatype.mavenbook.ch07.simple.weather.oauth.lone.WeatherYdnJava] will linger despite being asked to die via interruption
thread Thread[HttpClient-1-Worker-1,5,org.sonatype.mavenbook.ch07.simple.weather.oauth.lone.WeatherYdnJava] will linger despite being asked to die via interruption
thread Thread[HttpClient-1-Worker-2,5,org.sonatype.mavenbook.ch07.simple.weather.oauth.lone.WeatherYdnJava] will linger despite being asked to die via interruption
NOTE: 3 thread(s) did not finish despite being asked to via interruption. This is not a problem with exec:java, it is a problem with the running code. Although not serious, it should be remedied.
Couldn't destroy threadgroup org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=org.sonatype.mavenbook.ch07.simple.weather.oauth.lone.WeatherYdnJava,maxpri=10]
The exec:exec goal does not show the warning. I do not know the reason, but it could be that it terminates the threads unceremoniously or it waits for them to finish.
Some properties for the exec:java goal control how daemon threads are handled.
- daemonThreadJoinTimeout - if I set this to 60 seconds or more, then the daemon threads terminate on there own. I assume that the TCP connection was closed by one side, so the threads terminate.
- cleanupDaemonThreads - if this is set to false, then the threads are not interrupted and the timeout is not used. I assume that the threads are killed.
- stopUnresponsiveDaemonThreads - this is a bad idea for this example. If I set this to true, the app will never end. As soon as one is killed, another pops up in its place. I assume this would continue for a minute in this case, waiting for the TCP connection to close.
No comments:
Post a Comment