Patch for forum thread: "Stopping all J-Interop threads (2010-05-27)"
Keywords: Stopping j-Interop threads, using j-Interop in application servers.
Patch attached for actively stopping the different threads and timers that j-Interop starts. This is usable for instance when using j-Interop in an application server where the shutdown hook will not be called at application undeploy.
See old discussion at:
Besides the threads/timers discussed in that forum thread I found another "loose" thread not being stopped by the shutdown hook in the SelectorManager-class (the thread with the name: 'jI_SelectorManager'). So I have added calling of SelectorManager#destroy() to the shutdown method via the new JIComTransportFactory#destroy()-method that I had to introduce.
The way to actively shutdown all the j-Interop threads is by calling the static method:
After this, I assume that j-Interop can no longer be used in the same classloader, i.e. this method should *only* be used in application servers.
(oh, and by the way: Would it make sense for the project maintainer to change the status of the patches to "closed" when they have been applied to the current source trunk. - I walked through the current open patches, and as far as I can see most of them has been patched into the source tree).
Log in to post a comment.