|
From: Joe R. <joe...@me...> - 2006-06-22 12:04:45
|
Leif,
Thanks for this. Do you have any idea when 3.2.1 will be released?
Joe=20
-----Original Message-----
From: wra...@li...
[mailto:wra...@li...] On Behalf Of Leif
Mortenson
Sent: Thursday, June 22, 2006 4:04 AM
To: wra...@li...
Subject: Re: [Wrapper-user] How To Pause A Service
Joos, Heather,
I am working on it as we speak. It will be in the 3.2.1 release. =20
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=20
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 =3D
(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=20
> that pausing is disabled. I have given a reason as to why I want it=20
> enabled but they haven't responded on it yet.
> I made a workaround using a remote interface but that is not always=20
> desirable I think.
>
> Joos
>
> Heather Leonard wrote:
>>
>> My appologies if this question is already in the archives (currently=20
>> unavailable).
>>
>> I need to pause my service (Windows). I wrote an implementation of=20
>> the WrapperListener in order to be able to do this. When I install=20
>> the service and start it, the pause button is disabled in the=20
>> Services window and the net pause command is not valid for the=20
>> service. I spent my day yesterday looking through documentation in=20
>> 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=3Dlnk&kid=3D107521&bid=3D248729&dat=3D=
121642
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|