1 - Create your own class which implements LifeCycleListener.
2 - Add it inside of <Server> like anything else.
3 - When LifeCycleListener.lifecycleEvent is called the LifecycleEvent has a method called getData() which returns an object refence which I hope is the reference to the Server. But use getType to determine if the event fired is the one you want.
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html has the syntax for the Listener. Even though it is for Host - I speculate then smae concept applies to Server too.
-Tim
Remy Maucherat wrote:
Filip Hanik wrote:yes, you are right, how do I subscribe to this event?
I know that the server has a addLifeCycleListener, but how do I access the server from a cluster object for example?
You can go up the tree, I think, but otherwise, you can just use ServerFactory.getServer().
Remy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]