|
From: Leif M. <le...@ta...> - 2005-10-19 13:58:04
|
Sebastien,
This kind of thing is in the works for a future version. But for now it
is not
directly supported.
There is a simple workaround however. Write a new main class. In it
simply do the following:
public void main( String[] args )
{
if (WrapperManager.getJVMId() <= 5 )
{
MainClass.main( args );
}
else
{
RecoveryClass.main( args );
}
}
Then increase the max failed invocations from 5 to 6.
Cheers,
Leif
Sebastien Chateau wrote:
> Hi,
> I'm using this great product to wrap my java application (some kind of
> client multimedia player) and I'm totally satisfied with it. So I'd like
> to first say thanks for developping it.
> Now, let my explain my will : my application is relatively unstable yet,
> and some conditions can make its lauch impossible. I have set
> /wrapper.max_failed_invocations /with value 5. After 5 failed
> invocations, the wrapper stops invoking, like it's supposed to do.
> Now, I'd like to be able to "catch" this "giving up event", and for
> example trigger the invocation of another main class on this giving up.
> My purpose is to keep a trace of these events (e.g. in a local file)
> because they reveal important information to me.
> Is there any way to do this? Thanks in advance!
> Seb
>
> PS : for now I regularely check the file "wrapper.log" and look inside
> if I can find the pattern "There were 5 failed launches in a row, each
> lasting less than 300 seconds. Giving up."
>
|