Package wt.servlet
Class ContextMonitor
java.lang.Object
javax.management.StandardMBean
wt.jmx.core.StandardMBean
wt.servlet.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
-
Field Summary
Fields inherited from interface wt.servlet.ContextMonitorMBean
LOG4J_CONFIG_FILE_REF_PARAM_NAME, MBEAN_CONFIG_CHECK_INTERVAL_PARAM_NAME, MBEAN_CONFIG_FILE_REF_PARAM_NAME, ROOT_LOG4J_CONFIG_CHECK_INTERVAL_PARAM_NAME, WEB_APP_STARTING_NOTIF, WEB_APP_STOPPING_NOTIF -
Method Summary
Modifier and TypeMethodDescriptionstatic ContextMonitorgetContextMonitor(javax.servlet.ServletContext servletContext) Retrieve instance associated with a given ServletContext (web app).Return this MBean's MBeanLoader.Methods inherited from class wt.jmx.core.StandardMBean
cacheMBeanInfo, cacheMBeanInfoInInstance, createMBeanInfo, emailThisMBean, getAttributes, getCachedInstanceMBeanInfo, getCachedMBeanInfo, getDescription, getDescription, getDescription, getDescription, getImpact, getMBeanInfo, getParameterName, setAttributesMethods inherited from class javax.management.StandardMBean
getAttribute, getClassName, getConstructors, getDescription, getDescription, getDescription, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setImplementationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Method Details
-
getContextMonitor
Retrieve instance associated with a given ServletContext (web app).
Supported API: true -
getMBeanLoader
Return this MBean's MBeanLoader.
Supported API: true
-