Tomcat MBean Names

来源:互联网 发布:美工强大的游戏 编辑:程序博客网 时间:2024/05/06 18:33
 

Tomcat MBean Names

Background

We will be using JMX MBeans as the technology for implementing manageability of Tomcat.

One of the key concepts of JMX (and JSR-77) is that each management bean has a unique name in the MBeanServer's registry, and that management applications can utilize these names to retrieve the MBean of interest to them for a particular management operation. This document proposes a naming convention for MBeans that allows easy calculation of the name for a particular MBean. For background information on JMX MBean names, see theJava Management Extensions Instrumentation and Agent Specification , version 1.0, section 6. In particular, we will be discussing the String Representation ofObjectName instances.

Catalina Object Hierarchy

Tomcat's servlet container implementation, called Catalina, can be represented as a hierarchy of objects that contain references to each other. The object hierarchy can be represented as a tree, or (isomorphically) based on the nesting of configuration elements in the conf/server.xml file that is traditionally used to configure Tomcat stand-alone.

The valid component nestings for Catalina are depicted in the following table, with columns that contain the following values:

  • Pattern - Nesting pattern of XML elements (in the conf/server.xml file) used to configure this component.
  • Cardinality - Minimum and maximum number of occurrences of this element at this nesting position, which also corresponds to the minimum and maximum number of Catalina components.
  • Identifier - Name of the JavaBeans property of this component that represents the unique identifier (within the nested hierarchy), if any.
  • MBean ObjectName - The portion of the MBean object name that appearsafter the domain name. For now, it should be assumed that all of these MBeans appear in the default JMX domain.

In the MBean ObjectName descriptions, several types of symbolic expressions are utilized to define variable text that is replaced by corresponding values:

  • ${GROUP} - One of the standard MBean names of the specified "group" category. For example, the expression${REALM} represents the values like JDBCRealm and JAASRealm that identify the various MBeans for possible Realm components.
  • ${name} - Replaced by the value of property name from the current component.
  • ${parent.name} - Replaced by the value of property name from a parent of the current component, with the parent's type identified byparent .
  • ${###} - An arbitrary numeric identifier that preserves order but has no other particular meaning. In general, the server will assign numeric values to existing instances with large gaps into which new items can be configured if desired.
PatternCardinalityIdentifierMBean ObjectNameServer1..1(none)type=${SERVER}Server / Listener0..n(none)type=${LISTENER}, sequence=${###}Server / Service1..nnametype=${SERVICE}, name=${name}Server / Service / Connector1..naddress, porttype=${CONNECTOR}, service=${service}, port=${port}, address=${address}Server / Service / Connector / Factory0..1(none)(Only defined explicitly for an SSL connector, but can be treated as part of the connector component)Server / Service / Connector / Listener0..n(none)type=${LISTENER}, sequence=${###}, service=${service}, port=${connector.port}, address=${connector.address}Server / Service / Engine1..1(none)type=${ENGINE}, service=${service.name}Server / Service / Engine / Host1..nnametype=${HOST}, host=${name}, service=${service.name}Server / Service / Engine / Host / Context1..npathtype=${CONTEXT}, path=${path}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Context / InstanceListener0..n(none)type=${INSTANCE-LISTENER}, sequence=${###}, path=${context.path}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Context / Listener0..n(none)type=${LISTENER}, sequence=${###}, path=${context.path}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Context / Loader0..1(none)type=${LOADER}, path=${context.path}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Context / Manager0..1(none)type=${MANAGER}, path=${context.path}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Context / Realm0..1(none)type=${REALM}, path=${context.path}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Context / Resources0..1(none)type=${RESOURCES}, path=${context.path}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Context / Valve0..n(none)type=${VALVE}, sequence=${###}, path=${context.path}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Context / Wrapper0..n(none)j2eeType=Servlet,name=${name}, WebModule=//${host.name}/${context.name}, J2EEApplication=${context.J2EEApplication}, J2EEServer=${context.J2EEServer}Server / Service / Engine / Host / Context / WrapperLifecycle0..n(none)type=${WRAPPER-LIFECYCLE}, sequence=${###}, path=${context.path}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Context / WrapperListener0..n(none)type=${WRAPPER-LISTENER}, sequence=${###}, path=${context.path}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Listener0..n(none)type=${LISTENER}, sequence=${###}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Realm0..1(none)type=${REALM}, host=${host.name}, service=${service.name}Server / Service / Engine / Host / Valve0..n(none)type=${VALVE}, sequence=${###}, host=${host.name}, service=${service.name}Server / Service / Engine / Listener0..n(none)type=${LISTENER}, sequence=${###} (FIXME - disambiguate from Server / Service / Listener)Server / Service / Engine / Realm0..1(none)type=${REALM}, service=${service.name}Server / Service / Engine / Valve0..n(none)type=${VALVE}, sequence=${###}, service=${service.name}Server / Service / Listener0..n(none)type=${LISTENER}, sequence=${###} (FIXME - disambiguate from Server / Service / Engine / Listener)
MBean Groups and Names

The following MBean names shall be defined in the resource file /org/apache/catalina/mbeans/mbeans-descriptors.xml (and therefore available for use within the Administration/Configuration web application for Tomcat):

MBean NameGroup NameCatalina InterfaceImplementation ClassAccessLogValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.AccessLogValveBasicAuthenticatorVALVEorg.apache.catalina.Valveorg.apache.catalina.authenticator.BasicAuthenticatorCertificatesValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.CertificatesValveContextConfigLISTENERorg.apache.catalina.LifecycleListenerorg.apache.catalina.startup.ContextConfigContextEnvironmentRESOURCESorg.apache.catalina.deploy.ContextEnvironmentorg.apache.catalina.deploy.ContextEnvironmentContextResourceRESOURCESorg.apache.catalina.deploy.ContextResourceorg.apache.catalina.deploy.ContextResourceContextResourceLinkRESOURCESorg.apache.catalina.deploy.ContextResourceLinkorg.apache.catalina.deploy.ContextResourceLinkCoyoteConnectorCONNECTORorg.apache.catalina.Connectororg.apache.coyote.tomcat4.CoyoteConnectorDigestAuthenticatorVALVEorg.apache.catalina.Valveorg.apache.catalina.authenticator.DigestAuthenticatorEngineConfigLISTENERorg.apache.catalina.LifecycleListenerorg.apache.catalina.startup.EngineConfigErrorReportValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.ErrorReportValveErrorDispatcherValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.ErrorDispatcherValveFormAuthenticatorVALVEorg.apache.catalina.Valveorg.apache.catalina.authenticator.FormAuthenticatorGroupGROUPorg.apache.catalina.Grouporg.apache.catalina.GroupHostConfigLISTENERorg.apache.catalina.LifecycleListenerorg.apache.catalina.startup.HostConfigHttpConnector10CONNECTORorg.apache.catalina.Connectororg.apache.catalina.connector.http10.HttpConnectorHttpConnector11CONNECTORorg.apache.catalina.Connectororg.apache.catalina.connector.http.HttpConnectorJAASRealmREALMorg.apache.catalina.Realmorg.apache.catalina.realm.JAASRealmJDBCRealmREALMorg.apache.catalina.Realmorg.apache.catalina.realm.JDBCRealmJDBCUserDatabaseUSERDATABASEorg.apache.catalina.users.JDBCUserDatabaseorg.apache.catalina.users.JDBCUserDatabaseJNDIRealmREALMorg.apache.catalina.Realmorg.apache.catalina.realm.JNDIRealmMBeanFactory  org.apache.catalina.mbeans.MBeanFactoryMemoryRealmREALMorg.apache.catalina.Realmorg.apache.catalina.realm.MemoryRealmMemoryUserDatabaseUSERDATABASEorg.apache.catalina.users.MemoryUserDatabaseorg.apache.catalina.users.MemoryUserDatabaseNamingContextListenerLISTENERorg.apache.catalina.LifecycleListenerorg.apache.catalina.core.NamingContextListenerNamingResourcesRESOURCESorg.apache.catalina.deploy.NamingResourcesorg.apache.catalina.deploy.NamingResourcesNonLoginAuthenticatorVALVEorg.apache.catalina.Valveorg.apache.catalina.authenticator.NonLoginAuthenticatorPersistentManagerMANAGERorg.apache.catalina.Managerorg.apache.catalina.session.PersistentManagerRemoteAddrValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.RemoteAddrValveRemoteHostValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.RemoteHostValveRequestDumperValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.RequestDumperValveRoleROLEorg.apache.catalina.Roleorg.apache.catalina.RoleSingleSignOnVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.SingleSignOnSSLAuthenticatorVALVEorg.apache.catalina.Valveorg.apache.catalina.authenticator.SSLAuthenticatorStandardContextCONTEXTorg.apache.catalina.Contextorg.apache.catalina.core.StandardContextStandardContextValveVALVEorg.apache.catalina.Valveorg.apache.catalina.core.StandardContextValveStandardEngineENGINEorg.apache.catalina.Engineorg.apache.catalina.core.StandardEngineStandardEngineValveVALVEorg.apache.catalina.Valveorg.apache.catalina.core.StandardEngineValveStandardHostHOSTorg.apache.catalina.Hostorg.apache.catalina.core.StandardHostStandardHostValveVALVEorg.apache.catalina.Valveorg.apache.catalina.core.StandardHostValveStandardManagerMANAGERorg.apache.catalina.Managerorg.apache.catalina.session.StandardManagerStandardServerSERVERorg.apache.catalina.Serverorg.apache.catalina.core.StandardServerStandardServiceSERVICEorg.apache.catalina.Serviceorg.apache.catalina.core.StandardServiceStandardWrapperWRAPPERorg.apache.catalina.Wrapperorg.apache.catalina.core.StandardWrapperStandardWrapperValveVALVEorg.apache.catalina.Valveorg.apache.catalina.core.StandardWrapperValveUserUSERorg.apache.catalina.Userorg.apache.catalina.UserUserDatabaseRealmREALMorg.apache.catalina.Realmorg.apache.catalina.realm.UserDatabaseRealmWebappLoaderLOADERorg.apache.catalina.Loaderorg.apache.catalina.loader.WebappLoader
JSR-77 Cross Reference

The managed objects in the JSR-77 object hierarchy correspond to the specified MBean names or groups as follows:

JSR-77 Managed ObjectMBean Name or GroupCommentsJ2EEServer${SERVICE} Node${SERVICE}Tomcat supports a single node only.Port${CONNECTOR} Servlet${WRAPPER} WebModule${CONTEXT} 
JSR-88 Cross Reference

The deployment objects in the JSR-88 API object hierarchy correspond to the specified MBean names or groups as follows:

JSR-88 API ObjectMBean Name or GroupCommentsDeployableObject${CONTEXT}Context deployment info plus the corresponding WAR fileTarget${HOST} 
原创粉丝点击