Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#209 Stop call during startup bypasses WrapperListener.stop()

v3.3.1
open-fixed
Service (34)
5
2008-12-26
2008-09-10
Anonymous
No

When you call WrapperManager.stop() or WrapperManager.restart() from within the JVM while the start() method has not yet returned, causes the JVM to die immediately and the native code to launch a new JVM. The WrapperListener.stop() method is never called. This happens in both Windows and Unix.

This does not happen when the stop or restart is called externally (i.e. "StopTestWrapper-NT.bat" or "sh.script.in stop"/"sh.script.in restart")

Discussion

  • Leif Mortenson
    Leif Mortenson
    2008-12-26

    This has been confirmed in 3.3.1 and is actually by design. The Wrapper is designed to be used with existing applications and it is not always desirable to call the stop method unless the start method has completed. Our thinking here was that the start method would have the ability to do any required cleanup that was necessary.

    The Java state engine did not actually allow us to do otherwise. But we made some modifications and then added a new property: wrapper.listener.force_stop=TRUE which will tell the Wrapper to call the WrapperListener.stop method even if the start method did not complete. The default value, FALSE, will cause the Wrapper to behave as it always has and only call stop if the start method completed.

    This change will be in the 3.3.2 release.

    Cheers,
    Leif

    The problem is that the thread in the JVM which while handles all communication with the Wrapper is within the Start method at the time that WrapperManager.stop() is called. The Wrapper sends a STOP packet, but the JVM will never read it.

     
  • Leif Mortenson
    Leif Mortenson
    2008-12-26

    • milestone: --> v3.3.1
    • assigned_to: nobody --> mortenson
     
  • Leif Mortenson
    Leif Mortenson
    2008-12-26

    • status: open --> open-fixed