Package wt.servlet

Class ContextMonitor

All Implemented Interfaces:
EventListener, DynamicMBean, MBeanRegistration, NotificationBroadcaster, NotificationEmitter, javax.servlet.ServletContextListener, BaseObjectNamed, SelfEmailingMBean, ContextMonitorMBean

public final class ContextMonitor extends StandardMBean implements ContextMonitorMBean, BaseObjectNamed, javax.servlet.ServletContextListener, NotificationEmitter
Simple ServletContextListener/MBean which provides basic information on a web app context. More importantly, this ensures a proper log4j RepositySelector has been installed where appropriate and possible and loads other MBeans for the web app from a configuration file upon web app startup and shuts these down upon web app shutdown. Note not all MBeans are loaded from file here; in cases where the MBean is also a servlet engine listener of some variety the MBean is configured via web.xml and initialized by the servlet engine.

This MBean's configuration is very simple and is managed by via web app context parameters (in web.xml) with names as indicated by *_PARAM_NAME constants in this class.

Supported API: true

Extendable: false

  • Method Details

    • getContextMonitor

      public static ContextMonitor getContextMonitor(javax.servlet.ServletContext servletContext)
      Retrieve instance associated with a given ServletContext (web app).

      Supported API: true
    • getMBeanLoader

      public MBeanLoader getMBeanLoader()
      Return this MBean's MBeanLoader.

      Supported API: true