设为首页 收藏本站
查看: 568|回复: 0

[经验分享] Tomcat MBean Names

[复制链接]

尚未签到

发表于 2017-1-19 08:05:45 | 显示全部楼层 |阅读模式
Tomcat MBean Names
Background
  We will be using JMX MBeansas the technology forimplementing manageability of Tomcat.
  One of the key concepts of JMX (and JSR-77) is that each managementbean has a unique name in the MBeanServer's registry, and thatmanagement applications can utilize these names to retrieve the MBeanof interest to them for a particular management operation.This document proposes a naming convention for MBeans that allows easycalculation of the name for a particular MBean.  For backgroundinformation on JMX MBean names, see the Java Management ExtensionsInstrumentation and Agent Specification, version 1.0, section 6.In particular, we will be discussing the String Representation ofObjectNameinstances.
Catalina Object Hierarchy
  Tomcat's servlet container implementation, called Catalina, can berepresented as a hierarchy of objects that contain references to each other.The object hierarchy can be represented as a tree, or (isomorphically) basedon the nesting of configuration elements in the conf/server.xmlfile that is traditionally used to configure Tomcat stand-alone.
  The valid component nestings for Catalina are depicted in the followingtable, with columns that contain the following values:

  • Pattern- Nesting pattern of XML elements (in theconf/server.xmlfile) used to configure this component.
  • Cardinality- Minimum and maximum number of occurrences ofthis element at this nesting position, which also corresponds to theminimum and maximum number of Catalina components.
  • Identifier- Name of the JavaBeans property of this componentthat represents the unique identifier (within the nested hierarchy),if any.
  • MBean ObjectName- The portion of the MBean object name thatappears afterthe domain name.  For now, it should beassumed that all of these MBeans appear in the default JMX domain.
  In the MBean ObjectNamedescriptions, several types of symbolicexpressions are utilized to define variable text that is replaced bycorresponding values:

  • ${GROUP}- One of the standard MBean names of the specified"group" category.  For example, the expression ${REALM}represents the values like JDBCRealmand JAASRealmthat identify the various MBeans for possible Realmcomponents.
  • ${name}- Replaced by the value of property namefrom the current component.
  • ${parent.name}- Replaced by the value of propertynamefrom a parent of the current component, with theparent's type identified by parent.
  • ${###}- An arbitrary numeric identifier that preservesorder but has no other particular meaning.  In general, the server willassign numeric values to existing instances with large gaps into whichnew items can be configured if desired.
PatternCardinalityIdentifierMBean ObjectName
Server1..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 treatedas 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(andtherefore available for use within the Administration/Configurationweb application for Tomcat):
MBean NameGroup NameCatalina InterfaceImplementation Class
AccessLogValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.AccessLogValve
BasicAuthenticatorVALVEorg.apache.catalina.Valveorg.apache.catalina.authenticator.BasicAuthenticator
CertificatesValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.CertificatesValve
ContextConfigLISTENERorg.apache.catalina.LifecycleListenerorg.apache.catalina.startup.ContextConfig
ContextEnvironmentRESOURCESorg.apache.catalina.deploy.ContextEnvironmentorg.apache.catalina.deploy.ContextEnvironment
ContextResourceRESOURCESorg.apache.catalina.deploy.ContextResourceorg.apache.catalina.deploy.ContextResource
ContextResourceLinkRESOURCESorg.apache.catalina.deploy.ContextResourceLinkorg.apache.catalina.deploy.ContextResourceLink
CoyoteConnectorCONNECTORorg.apache.catalina.Connectororg.apache.coyote.tomcat4.CoyoteConnector
DigestAuthenticatorVALVEorg.apache.catalina.Valveorg.apache.catalina.authenticator.DigestAuthenticator
EngineConfigLISTENERorg.apache.catalina.LifecycleListenerorg.apache.catalina.startup.EngineConfig
ErrorReportValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.ErrorReportValve
ErrorDispatcherValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.ErrorDispatcherValve
FormAuthenticatorVALVEorg.apache.catalina.Valveorg.apache.catalina.authenticator.FormAuthenticator
GroupGROUPorg.apache.catalina.Grouporg.apache.catalina.Group
HostConfigLISTENERorg.apache.catalina.LifecycleListenerorg.apache.catalina.startup.HostConfig
HttpConnector10CONNECTORorg.apache.catalina.Connectororg.apache.catalina.connector.http10.HttpConnector
HttpConnector11CONNECTORorg.apache.catalina.Connectororg.apache.catalina.connector.http.HttpConnector
JAASRealmREALMorg.apache.catalina.Realmorg.apache.catalina.realm.JAASRealm
JDBCRealmREALMorg.apache.catalina.Realmorg.apache.catalina.realm.JDBCRealm
JDBCUserDatabaseUSERDATABASEorg.apache.catalina.users.JDBCUserDatabaseorg.apache.catalina.users.JDBCUserDatabase
JNDIRealmREALMorg.apache.catalina.Realmorg.apache.catalina.realm.JNDIRealm
MBeanFactoryorg.apache.catalina.mbeans.MBeanFactory
MemoryRealmREALMorg.apache.catalina.Realmorg.apache.catalina.realm.MemoryRealm
MemoryUserDatabaseUSERDATABASEorg.apache.catalina.users.MemoryUserDatabaseorg.apache.catalina.users.MemoryUserDatabase
NamingContextListenerLISTENERorg.apache.catalina.LifecycleListenerorg.apache.catalina.core.NamingContextListener
NamingResourcesRESOURCESorg.apache.catalina.deploy.NamingResourcesorg.apache.catalina.deploy.NamingResources
NonLoginAuthenticatorVALVEorg.apache.catalina.Valveorg.apache.catalina.authenticator.NonLoginAuthenticator
PersistentManagerMANAGERorg.apache.catalina.Managerorg.apache.catalina.session.PersistentManager
RemoteAddrValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.RemoteAddrValve
RemoteHostValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.RemoteHostValve
RequestDumperValveVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.RequestDumperValve
RoleROLEorg.apache.catalina.Roleorg.apache.catalina.Role
SingleSignOnVALVEorg.apache.catalina.Valveorg.apache.catalina.valves.SingleSignOn
SSLAuthenticatorVALVEorg.apache.catalina.Valveorg.apache.catalina.authenticator.SSLAuthenticator
StandardContextCONTEXTorg.apache.catalina.Contextorg.apache.catalina.core.StandardContext
StandardContextValveVALVEorg.apache.catalina.Valveorg.apache.catalina.core.StandardContextValve
StandardEngineENGINEorg.apache.catalina.Engineorg.apache.catalina.core.StandardEngine
StandardEngineValveVALVEorg.apache.catalina.Valveorg.apache.catalina.core.StandardEngineValve
StandardHostHOSTorg.apache.catalina.Hostorg.apache.catalina.core.StandardHost
StandardHostValveVALVEorg.apache.catalina.Valveorg.apache.catalina.core.StandardHostValve
StandardManagerMANAGERorg.apache.catalina.Managerorg.apache.catalina.session.StandardManager
StandardServerSERVERorg.apache.catalina.Serverorg.apache.catalina.core.StandardServer
StandardServiceSERVICEorg.apache.catalina.Serviceorg.apache.catalina.core.StandardService
StandardWrapperWRAPPERorg.apache.catalina.Wrapperorg.apache.catalina.core.StandardWrapper
StandardWrapperValveVALVEorg.apache.catalina.Valveorg.apache.catalina.core.StandardWrapperValve
UserUSERorg.apache.catalina.Userorg.apache.catalina.User
UserDatabaseRealmREALMorg.apache.catalina.Realmorg.apache.catalina.realm.UserDatabaseRealm
WebappLoaderLOADERorg.apache.catalina.Loaderorg.apache.catalina.loader.WebappLoader
JSR-77 Cross Reference
  The managed objects in the JSR-77 object hierarchy correspondto the specified MBean names or groups as follows:
JSR-77 Managed ObjectMBean Name or GroupComments
J2EEServer${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 correspondto the specified MBean names or groups as follows:
JSR-88 API ObjectMBean Name or GroupComments
DeployableObject${CONTEXT}Context deployment info plus the corresponding WAR file
Target${HOST}

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-330406-1-1.html 上篇帖子: tomcat搭建服务器开发环境 下篇帖子: Sysdeo Tomcat Plugin(V3.2.1) 启动Tomcat报错
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表