tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mayer Crystal <mcrys...@acedsl.com>
Subject Re: JMX question
Date Sun, 29 Jun 2003 18:21:13 GMT
Tim,

	I understand that this will allow me to reference the classes, but does
it force the JMX server to be loaded in the application context?  For
example, if my filter executes the following code:

ArrayList servers = MBeanServerFactory.findMBeanServer( null );

will servers be non-null and have a size > 0?


Thanks,
Mayer



On Sun, 2003-06-29 at 22:10, Bill Barker wrote:
> Less dangerous is to move the jmx jar(s) from server/lib to common/lib.
> It's in server/lib since older versions of JMX lacked a way to prevent a
> rogue Servlet from accessing all of the Tomcat internals via JMX.
> 
> "Tim Funk" <funkman@joedog.org> wrote in message
> news:3EFF20A2.8040001@joedog.org...
> > Hmmm. You might (emphasis might because I have no clue at this point in
> time)
> >   need to make you webapp "privileged" so in your webapp declaration you
> have:
> >
> > <Context ... privileged="true"/>
> >
> > -Tim
> >
> > Mayer Crystal wrote:
> > > I apologize if a similar question has been asked before, but I couldn't
> > > find anything like this in the archive.
> > >
> > > What I am trying to do is as follows:  I have a filter which is attached
> > > to a servlet which is preloaded.  When tomcat starts up, it loads the
> > > servlet and its filters into memory and calls the corresponding init
> > > methods.  In the init of the filter, the code attempts to retrieve a
> > > reference to the MBeanServer and register an MBean.  During startup,
> > > however, it appears that the server is null (i.e. hasn't been started).
> > > I know that Tomcat ships with the mx4j server/classes, so I was
> > > wondering if there is a way to instruct Tomcat to load the mbean server
> > > so that it is available even for filters/servlets that are loaded on
> > > startup?  (I know that there is a way to use the mbeans descriptor file,
> > > but unfortunately this mbean is dynamic and created and referenced in
> > > the code directly so it can't be initialized outside of the filter's
> > > scope. )
> > >
> > > If anyone has any suggestions, please let me know.
> > >
> > > TIA,
> > > Mayer
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
-- 
Mayer Crystal <mcrystal@acedsl.com>


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


Mime
View raw message