World Map
Java Service Wrapper is the easiest way to make your product more reliable.
  • Free Trial
  • Buy Now
wrapper.pausable.stop_jvm Property

wrapper.pausable.stop_jvm

Kompatibel :3.5.0
Editionen :Professional EditionStandard EditionCommunity Edition
Betriebssysteme :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

This property controls what happens when Wrapper is Paused in using one of the actions described in the wrapper.pausable property documentation. This property has no effect unless the wrapper.pausable property is TRUE.

Setting this property to TRUE will cause the JVM to be shutdown until the service is resumed or stopped. If, on the other hand, it is FALSE, the JVM will contine to run normally and the Wrapper will send a service control event to the JVM which can be handled in user code to put the Application into a paused state.

The default value is "TRUE".

Example:
wrapper.pausable=TRUE
wrapper.pausable.stop_jvm=TRUE

To receive and handle the service control events in a JVM that is left running, it is necessary to implement code like the following. This example creates and registers a WrapperEventListener which is flagged to only receive service events.

Example:
WrapperManager.addWrapperEventListener( new WrapperEventListener() {
    public void fired( WrapperEvent event ) {
       if ( event instanceof WrapperServiceControlEvent ) {
          WrapperServiceControlEvent scEvent = (WrapperServiceControlEvent)event;
          switch ( scEvent.getServiceControlCode() ) {
          case WrapperManager.SERVICE_CONTROL_CODE_PAUSE:
             myPauseCallback();
             break;
          case WrapperManager.SERVICE_CONTROL_CODE_CONTINUE:
             myContinueCallback();
             break;
          }
       }
    }
}, WrapperEventListener.EVENT_FLAG_SERVICE );

NOTE

For backwards compatibility, this property defaults to the value of the wrapper.ntservice.pausable.stop_jvm property.

Reference: Pausable