tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filip Hanik" <>
Subject RE: Startup question
Date Thu, 20 Feb 2003 18:04:46 GMT
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.


-----Original Message-----
From: Costin Manolache []
Sent: Thursday, February 20, 2003 9:54 AM
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 :-)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message