|
From: Joost J. <jj...@fi...> - 2006-06-22 08:07:57
|
Thanks Leif,
This is a good solution and I for one am happy with it.
Thanks for your response.
With regards,
Joost.
Leif Mortenson wrote:
> Joos, Heather,
> I am working on it as we speak. It will be in the 3.2.1 release.
> There are some major
> changes to the state engine that are required so it is turning out to be
> a little more work than
> I had expected. I think I have everything worked out though.
>
> The Wrapper will allow 2 modes of operation. The first will stop
> the JVM whenever
> the service is paused. This stoppage will reset the failed invocation
> count and allow
> restarts from that state even if restarts have been disabled. A special
> case.
> The second mode will keep the JVM running while paused. But send an
> event to
> the JVM so it can handle it. If the JVM crashes for any reason while
> in this state,
> it will stay down until the service is continued. When continued, the
> exit will be
> counted and handled as a regular restart. If restarts are disabled or
> the restart count
> exceeds the configured max, the wrapper will stop at that point.
>
> In either mode, the service can be stopped while paused. If the JVM
> is running
> at the time, it can initiate the stop.
>
> The WrapperListener class itself can not be modified to handle the
> pause/continue
> events as the addition of such a method would break things for existing
> users. I had
> added a new event/listener hierarchy for 3.2.0 that is much more
> flexible. This new
> method allows you to handle this as follows:
>
> 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 );
>
> You can write the above code in 3.2.0, but those event values will never
> be received
> as things are implemented in that version. I haven't compiled the
> above, so hopefully
> there are no typos. :-)
>
> Cheers,
> Leif
>
> Joost Jens wrote:
>
>> I have asked this before. The service registers itself in such a way
>> that pausing is disabled. I have given a reason as to why I want it
>> enabled but they haven't responded on it yet.
>> I made a workaround using a remote interface but that is not always
>> desirable I think.
>>
>> Joos
>>
>> Heather Leonard wrote:
>>
>>> My appologies if this question is already in the archives (currently
>>> unavailable).
>>>
>>> I need to pause my service (Windows). I wrote an implementation of
>>> the WrapperListener in order to be able to do this. When I install
>>> the service and start it, the pause button is disabled in the
>>> Services window and the net pause command is not valid for the
>>> service. I spent my day yesterday looking through documentation in
>>> order to find a solution but have been unable to find one so far.
>>>
>>> Any help you can give will be greatly appreciated.
>>>
>>> Thanks,
>>> Heather
>>>
>>>
>
>
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
|