#266 Wrapper Doesn't Restart Service if Close Button Clicked

Service (34)

We're using Wrapper 3.5.9 to register our software as Windows Services. In the Services window, if a user clicks on "Restart the service", the wrapper first issues a stop of the JVM and then a start. If the user clicks the "Close" button while the JVM is being stopped the Wrapper, the Wrapper does not longer restart the JVM but simply stops. So far, we have observed this behaviour in any recent Windows OS (XP, Vista, 7, both 32 and 64-bit).

This used to work in an earlier version of Wrapper we were using, namely 3.2.3. Since it takes quite a while till our service is fully up and running, it is essential to be able to close the window and have the service restarted reliably. Although there is an easy workaround (be patient and wait a wee bit longer) this has caused us some headaches in the past.


  • Robert Barbey

    Robert Barbey - 2011-09-22
    • priority: 5 --> 7
  • Leif Mortenson

    Leif Mortenson - 2011-09-22

    Are you referring to the "Close" button in the progress dialog after you press the little restart button in the Services Control Panel? I think I was able to reproduce that but need to go back and double check the behavior of 3.2.3. In both cases, the Wrapper should be respecting the signals received from the Windows Service Manager.

    Please confirm that is what you are talking about and we will go back and compare the signals and our response in both 3.2.3 and 3.5.9.


  • Robert Barbey

    Robert Barbey - 2011-09-22

    Hi Leif,

    thanks for getting back to me so quickly. Yes, you got it exactly right, I was talking about the "Close" button in the progress dialog.


  • Christian Mueller

    Hello Robert,

    My apologies for the delay on this.

    I was checking this an couldn't first find no difference in behavior between 3.2.3 and 3.5.9 when hitting the close button.
    Once the service is running, and the restart service button was hit, the SCM initially 'only' sends a stop signal to the Wrapper, waits for the Wrapper to indicate it has stopped and after that starts the service again.
    This are in fact 2 processes (stop and start).
    Now when the close button is hit, while the SCM is waiting for the service to stop, the SCM is not able to send the start signal.
    I'm not sure if there is a way for us to catch this correctly. Since for restart and stop, the SCM sends the same signal.

    I did test this on a WinXP machine. So it might be, that in an earlier Windows Version the behavior of the SCM was different to the one now...
    I will try to dig around a bit more and let you know once I find out sth else.

    Thank you,


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