tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Startup question
Date Thu, 20 Feb 2003 17:43:34 GMT
Would this work too?

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: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message