#12 Patch for forum thread: "Stopping all J-Interop threads"


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


  • Morten Andersen

    Morten Andersen - 2011-10-07

    patch v2 (NullPointerCheck) for JISession, JIComOxidRuntime, SelectorManager, JIComTransportFactory

  • Morten Andersen

    Morten Andersen - 2011-10-07

    Added a new version of the patch, with a check for serverSocket being null in the JIComOxidRuntime, as this would be the case if no connections has been made at all before shutdown.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks