I like that idea. So to help me out here, if I work with the service interface,
there is no way for me to call "addLifecycleListener".
So for a few simple questions,
1. how do I get the "server/service" object through JMX?
2. I could check using reflection if the addLifecycleListener method is available, but 
an interface would be nicer.

Filip

-----Original Message-----
From: Costin Manolache [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 9:54 AM
To: [EMAIL PROTECTED]
Subject: Re: Startup question


A much better way - at least for tomcat5, but it should work for tomcat4 - 
is to use JMX. The server and service should be registered. We expose the
"managedResource" attribute of type "Object" - you can cast it to the 
right type.

All you need is to know the object name of the server.

BTW, I would strongly suggest dealing with the Service - this way your 
code will work for embeded catalina ( for example jboss doesn't use Server,
and AFAIK it is not required ). 

Static methods are not very nice :-)

Costin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to