Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: User define mbeans in servlet under Tomcat 5.0.x

Philipp von dem Bussche

2004-01-26

Replies:

Hi,
no you do not have to, I even would say you must not !
See here:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/mbeans-descriptor-howto.html
You can add your own mbean descriptor by adding a descriptors attribute
to your ServerLifeCycleListener. I made a jar-File containing my MBeans
and the descriptor and put it into server/lib, so tomcat found it while
booting.
I can't definetly say, if you are able to use it in you admin/manager
application but I think you can.

Phil.

Samuel Cheung wrote:
> Thanks for the quick response.
>
> So in order to add my own mbeans for my servlet, I need to get & modify the
> file org.apache.catalina.mbeans.mbeans-descriptor.xml in Tomcat source and
> rebuild the whole tomcat?
>
> So I can't use my own mbeans for my servlet on the official Tomcat 5.0.x?
>
> And could you please tell me if I can manager my own mbeans thru the
> existing Tomcat 5.0.x admin/manager interface?
>
> Thank you again.
>
>
> -----Original Message-----
> From: Shapira, Yoav [mailto:Yoav.Shapira@(protected)]
> Sent: Monday, January 26, 2004 12:43 PM
> To: Tomcat Users List
> Subject: RE: User define mbeans in servlet under Tomcat 5.0.x
>
>
>
> Howdy,
>
>
>>Is it possible for me to add my own Standard/Dynamic MBeans in my
>
> servlet
>
>>and I can manage that mbean thru Tomcat admin/manager interface?
>>
>
>>From here, it said I can add my own mbean, but I can't find the file
>
>>org.apache.catalina.mbeans.mbeans-descriptor.xml
>>http://jakarta.apache.org/tomcat/tomcat-5.0-doc/mbeans-descriptor-
>>howto.html
>
>
> The same URL tells you where the file is:
> org.apache.catalina.mbeans.mbeans-descriptor.xml. You can also see it
> via cvs.apache.org.
>
> The MBeans have to be available to the common classloader, so can't just
> put them in your WEB-INF/classes or WEB-INF/lib directory. You can put
> them in common/classes or common/lib. Alternatively you can make your
> webapp privileged. Finally, take all this with a grain of salt as I
> haven't added user webapps MBeans to tomcat5, so this is just theory on
> my part.
>
> Yoav Shapira
>
>
>
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential, proprietary
> and/or privileged. This e-mail is intended only for the individual(s) to
> whom it is addressed, and may not be saved, copied, printed, disclosed or
> used by anyone else. If you are not the(an) intended recipient, please
> immediately delete this e-mail from your computer system and notify the
> sender. Thank you.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
> For additional commands, e-mail: tomcat-user-help@(protected)
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.