I'm deploying an EAR with a jar in the lib folder of the ear. This jar spawns a DefaultFileMonitor thread (from the Apache Commons api) and watches a file.
When I use twiddle to do a redeploy of the EAR, the undeploy that is called for all the WARs doesn't seem to kill the DefaultFileMonitor thread.
The issue is that will keep multiple DefaultFileMonitor open on the same file and it is causing issues.
What is the proper way to kill this thread? Is twiddle to blame here?
Here is the code that I'm using to load the DefaultFileMonitor