Bill-
Thanks for the quick response. So the code which you supply allows us to
find a reference to the MBeanServer and instantiate our MBean inside
that server. But I'm a little surprised to find this driven by Java
code; I had really expected this to be done with configuration files.
However, my first thought as to how to apply this would be to create a
very tiny servlet which would be loaded by Tomcat upon startup. This
servlet could run the MBean creation code during it's initialization.
Do you have another thought as to how to apply this?
-- Eric
On Mon, 2004-08-09 at 23:10, Bill Barker wrote:
> The docs you've described are mostly for if you want custom Tomcat
> components (such as Valves or Realms). You'd want something basic like:
> MBeanServer mserver =
> (MBeanServer)MBeanServerFactory.findMBeanServer(null).get(0);
> ObjectName loader = new
> ObjectName("Catalina:type=WebappClassLoader,path=/myapp,host=localhost");
> ObjectName mylight = new ObjectName("MyApp:type=lightbulb");
> mserver.createMBean("scratch.LightBulbDynamicMBean", mylight, loader);
>
> Of course, you have to change the host and path to match your app, and the
> domain of the loader to match the Engine name if you've changed it from its
> default value.
>
> "Eric Herman" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I'm looking for help from someone with some experience deploying
> > DynamicMBeans to Tomcat.
> >
> > In short, my questions boil down to some very basic information gaps:
> > once we have a DynamicMBean,
> > (1) What do we need to add to the server.xml file?
> > (2) What other configuration file(s) need to be created/edited?
> > (3) What are the contents of those files?
[snip]
--
Eric Herman, Software Developer
MySQL AB, www.mysql.com
Office: +1 206 720 1724
Are you MySQL certified? www.mysql.com/certification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]