`
touchmm
  • 浏览: 1036733 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

Tomcat MBean Names

阅读更多

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 the Java Management Extensions Instrumentation and Agent Specification , version 1.0, section 6. In particular, we will be discussing the String Representation of ObjectName 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 appears after 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 by parent .
  • ${###} - 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.
Pattern Cardinality Identifier MBean ObjectName
Server 1..1 (none) type=${SERVER}
Server / Listener 0..n (none) type=${LISTENER}, sequence=${###}
Server / Service 1..n name type=${SERVICE}, name=${name}
Server / Service / Connector 1..n address, port type=${CONNECTOR}, service=${service}, port=${port}, address=${address}
Server / Service / Connector / Factory 0..1 (none) (Only defined explicitly for an SSL connector, but can be treated as part of the connector component)
Server / Service / Connector / Listener 0..n (none) type=${LISTENER}, sequence=${###}, service=${service}, port=${connector.port}, address=${connector.address}
Server / Service / Engine 1..1 (none) type=${ENGINE}, service=${service.name}
Server / Service / Engine / Host 1..n name type=${HOST}, host=${name}, service=${service.name}
Server / Service / Engine / Host / Context 1..n path type=${CONTEXT}, path=${path}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Context / InstanceListener 0..n (none) type=${INSTANCE-LISTENER}, sequence=${###}, path=${context.path}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Context / Listener 0..n (none) type=${LISTENER}, sequence=${###}, path=${context.path}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Context / Loader 0..1 (none) type=${LOADER}, path=${context.path}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Context / Manager 0..1 (none) type=${MANAGER}, path=${context.path}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Context / Realm 0..1 (none) type=${REALM}, path=${context.path}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Context / Resources 0..1 (none) type=${RESOURCES}, path=${context.path}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Context / Valve 0..n (none) type=${VALVE}, sequence=${###}, path=${context.path}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Context / Wrapper 0..n (none) j2eeType=Servlet,name=${name}, WebModule=//${host.name}/${context.name}, J2EEApplication=${context.J2EEApplication}, J2EEServer=${context.J2EEServer}
Server / Service / Engine / Host / Context / WrapperLifecycle 0..n (none) type=${WRAPPER-LIFECYCLE}, sequence=${###}, path=${context.path}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Context / WrapperListener 0..n (none) type=${WRAPPER-LISTENER}, sequence=${###}, path=${context.path}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Listener 0..n (none) type=${LISTENER}, sequence=${###}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Realm 0..1 (none) type=${REALM}, host=${host.name}, service=${service.name}
Server / Service / Engine / Host / Valve 0..n (none) type=${VALVE}, sequence=${###}, host=${host.name}, service=${service.name}
Server / Service / Engine / Listener 0..n (none) type=${LISTENER}, sequence=${###} (FIXME - disambiguate from Server / Service / Listener)
Server / Service / Engine / Realm 0..1 (none) type=${REALM}, service=${service.name}
Server / Service / Engine / Valve 0..n (none) type=${VALVE}, sequence=${###}, service=${service.name}
Server / Service / Listener 0..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 Name Group Name Catalina Interface Implementation Class
AccessLogValve VALVE org.apache.catalina.Valve org.apache.catalina.valves.AccessLogValve
BasicAuthenticator VALVE org.apache.catalina.Valve org.apache.catalina.authenticator.BasicAuthenticator
CertificatesValve VALVE org.apache.catalina.Valve org.apache.catalina.valves.CertificatesValve
ContextConfig LISTENER org.apache.catalina.LifecycleListener org.apache.catalina.startup.ContextConfig
ContextEnvironment RESOURCES org.apache.catalina.deploy.ContextEnvironment org.apache.catalina.deploy.ContextEnvironment
ContextResource RESOURCES org.apache.catalina.deploy.ContextResource org.apache.catalina.deploy.ContextResource
ContextResourceLink RESOURCES org.apache.catalina.deploy.ContextResourceLink org.apache.catalina.deploy.ContextResourceLink
CoyoteConnector CONNECTOR org.apache.catalina.Connector org.apache.coyote.tomcat4.CoyoteConnector
DigestAuthenticator VALVE org.apache.catalina.Valve org.apache.catalina.authenticator.DigestAuthenticator
EngineConfig LISTENER org.apache.catalina.LifecycleListener org.apache.catalina.startup.EngineConfig
ErrorReportValve VALVE org.apache.catalina.Valve org.apache.catalina.valves.ErrorReportValve
ErrorDispatcherValve VALVE org.apache.catalina.Valve org.apache.catalina.valves.ErrorDispatcherValve
FormAuthenticator VALVE org.apache.catalina.Valve org.apache.catalina.authenticator.FormAuthenticator
Group GROUP org.apache.catalina.Group org.apache.catalina.Group
HostConfig LISTENER org.apache.catalina.LifecycleListener org.apache.catalina.startup.HostConfig
HttpConnector10 CONNECTOR org.apache.catalina.Connector org.apache.catalina.connector.http10.HttpConnector
HttpConnector11 CONNECTOR org.apache.catalina.Connector org.apache.catalina.connector.http.HttpConnector
JAASRealm REALM org.apache.catalina.Realm org.apache.catalina.realm.JAASRealm
JDBCRealm REALM org.apache.catalina.Realm org.apache.catalina.realm.JDBCRealm
JDBCUserDatabase USERDATABASE org.apache.catalina.users.JDBCUserDatabase org.apache.catalina.users.JDBCUserDatabase
JNDIRealm REALM org.apache.catalina.Realm org.apache.catalina.realm.JNDIRealm
MBeanFactory org.apache.catalina.mbeans.MBeanFactory
MemoryRealm REALM org.apache.catalina.Realm org.apache.catalina.realm.MemoryRealm
MemoryUserDatabase USERDATABASE org.apache.catalina.users.MemoryUserDatabase org.apache.catalina.users.MemoryUserDatabase
NamingContextListener LISTENER org.apache.catalina.LifecycleListener org.apache.catalina.core.NamingContextListener
NamingResources RESOURCES org.apache.catalina.deploy.NamingResources org.apache.catalina.deploy.NamingResources
NonLoginAuthenticator VALVE org.apache.catalina.Valve org.apache.catalina.authenticator.NonLoginAuthenticator
PersistentManager MANAGER org.apache.catalina.Manager org.apache.catalina.session.PersistentManager
RemoteAddrValve VALVE org.apache.catalina.Valve org.apache.catalina.valves.RemoteAddrValve
RemoteHostValve VALVE org.apache.catalina.Valve org.apache.catalina.valves.RemoteHostValve
RequestDumperValve VALVE org.apache.catalina.Valve org.apache.catalina.valves.RequestDumperValve
Role ROLE org.apache.catalina.Role org.apache.catalina.Role
SingleSignOn VALVE org.apache.catalina.Valve org.apache.catalina.valves.SingleSignOn
SSLAuthenticator VALVE org.apache.catalina.Valve org.apache.catalina.authenticator.SSLAuthenticator
StandardContext CONTEXT org.apache.catalina.Context org.apache.catalina.core.StandardContext
StandardContextValve VALVE org.apache.catalina.Valve org.apache.catalina.core.StandardContextValve
StandardEngine ENGINE org.apache.catalina.Engine org.apache.catalina.core.StandardEngine
StandardEngineValve VALVE org.apache.catalina.Valve org.apache.catalina.core.StandardEngineValve
StandardHost HOST org.apache.catalina.Host org.apache.catalina.core.StandardHost
StandardHostValve VALVE org.apache.catalina.Valve org.apache.catalina.core.StandardHostValve
StandardManager MANAGER org.apache.catalina.Manager org.apache.catalina.session.StandardManager
StandardServer SERVER org.apache.catalina.Server org.apache.catalina.core.StandardServer
StandardService SERVICE org.apache.catalina.Service org.apache.catalina.core.StandardService
StandardWrapper WRAPPER org.apache.catalina.Wrapper org.apache.catalina.core.StandardWrapper
StandardWrapperValve VALVE org.apache.catalina.Valve org.apache.catalina.core.StandardWrapperValve
User USER org.apache.catalina.User org.apache.catalina.User
UserDatabaseRealm REALM org.apache.catalina.Realm org.apache.catalina.realm.UserDatabaseRealm
WebappLoader LOADER org.apache.catalina.Loader org.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 Object MBean Name or Group Comments
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 correspond to the specified MBean names or groups as follows:

JSR-88 API Object MBean Name or Group Comments
DeployableObject ${CONTEXT} Context deployment info plus the corresponding WAR file
Target ${HOST}
分享到:
评论

相关推荐

    tomcat及其配置文件

    2. `context.xml`: 这个文件用于定义特定Web应用程序的全局配置,如数据源、MBean服务器等。通常,此文件会被放在Web应用程序的META-INF目录下,但也可以在`server.xml`中引用。 3. `web.xml`: 每个Web应用程序都有...

    tomcat6的源码

    Apache Tomcat 6是一款广泛应用的开源Java Servlet容器,它实现了Java EE中的Servlet和JSP规范。这个源码包,"apache-tomcat-6.0.43-src",是Tomcat 6的官方源代码,非常适合开发者进行深入学习和自定义修改。以下是...

    tomcat8和tomcat7

    4. **MBean改进**:提供了更强大的MBean注册表,增强了管理工具的功能。 5. **连接器增强**:除了NIO,还引入了Apr(Apache Portable Runtime)连接器,利用操作系统级别的特性提升性能。 6. **标签库支持**:EL 3.0...

    tomcat7和8

    6. **MBean服务器**:内置了MBean服务器,使得通过Java Management Extensions (JMX)进行远程监控和管理更加方便。 **比较与选择** Tomcat 7和8的选择取决于你的项目需求。如果你的项目需要Java EE 7规范的支持,...

    Java分布式应用学习笔记09JMX-MBean的介绍

    ### Java分布式应用学习笔记09JMX-MBean的介绍 #### MBean概念及作用 MBean,即Managed Bean,是在JMX(Java Management Extensions)框架中用于管理资源的一种特殊Java对象。通过MBean,可以方便地对应用程序进行...

    Tomcat源码研究.pdf

    - **JConsole 使用**:JConsole是Java自带的一个可视化工具,可用于连接到Tomcat的MBean Server,查看和管理Tomcat的各种MBeans。 - **远程监控**:通过配置,可以让JConsole或其他JMX客户端工具远程连接到Tomcat的...

    Tomcat书籍

    1. 新特性介绍:详述Tomcat 8引入的新功能,如HTTP/2支持、WebSocket API改进、MBean服务器集成等,让读者了解升级到Tomcat 8的优势。 2. 升级指南:提供从旧版本到Tomcat 8的升级步骤和注意事项,确保平滑过渡。 ...

    tomcat8.5.47全部版本集合(linux-window64位-window32位).rar

    Tomcat是Apache软件基金会下的一个开源项目,主要负责运行Java Servlet和JavaServer Pages(JSP)的应用服务器。它是Java EE Web应用的标准实现之一,广泛应用于各种规模的企业级应用开发和部署。本压缩包"tomcat...

    tomcat6到8系列.zip

    Tomcat 7加强了安全性和管理功能,例如增加了对JAAS(Java Authentication and Authorization Service)的支持,改进了MBean(Managed Beans)的管理,以及提供了一种更简便的部署方式——通过目录结构或WAR文件直接...

    Tomcat 6,7,8三个版本

    此外,Tomcat 8还加强了对SSL/TLS的管理,提供了更强大的安全管理,同时引入了更多的MBean,使得服务器的监控和管理更加方便。 在文件结构上,从Tomcat 6到Tomcat 8,也有一些变化。例如,Tomcat 8将web.xml的部署...

    LambdaProbe监控Tomcat 和Jconsole 监控Tomcat

    标题中的“LambdaProbe监控Tomcat”和“Jconsole监控Tomcat”是指两种不同的方式来监控Java应用程序服务器,特别是Apache Tomcat。这两种工具都是为了帮助开发者和运维人员了解Tomcat的运行状态,诊断性能问题,以及...

    Tomcat6.0(apachetomcat.exe)

    2. **JMX监控**:通过JMX(Java Management Extensions)可以远程监控Tomcat的状态,包括内存、线程、MBean等。 **六、扩展性与社区支持** Tomcat 6.0拥有活跃的开发者社区,提供了大量的扩展插件和第三方模块,如...

    CentOS(Linux)下tomcat最新稳定的版本

    - **MBean改进**:增强了MBean服务器的功能,便于管理和监控Tomcat状态。 - **国际化和本地化**:支持更多的语言和区域设置,满足全球用户需求。 管理Tomcat时,可以使用以下命令: - `shutdown.sh`:停止Tomcat...

    tomcat服务器7和8

    7. **MBean改进**:JMX管理接口进一步完善,提供了更多可监控的MBean,便于远程管理和诊断。 综上所述,Tomcat 7和8都是Java Web开发中的重要工具,它们的差异主要体现在对Java EE规范的支持程度、性能优化以及新...

    tomcat8 zip包

    6. **MBean改进**:通过改进的MBean(Managed Beans)支持,可以更方便地管理和监控Tomcat的内部组件。 7. **错误页面处理**:Tomcat8改进了错误页面的处理机制,允许在web.xml中定义全局的错误处理页面,提升了...

    tomcat 6.0.18

    - **使用JMX(Java Management Extensions):** 通过监控和管理Tomcat的MBean来诊断问题。 总之,Apache Tomcat 6.0.18 为Java Web开发者提供了一个简单、高效且可靠的平台。尽管随着技术的发展,更新的版本已...

    tomcat8.0源码

    - JMX用于监控和管理Tomcat实例,包括内存使用、线程状态、MBean注册等。 9. **错误处理和调试** - 错误页面和异常处理:通过`web.xml`配置,可以自定义错误页面和异常处理器。 - 日志系统:Juli提供了详细的...

    TOMCAT的线程池源码

    例如,Tomcat线程池提供了详细的MBean接口,允许管理员在运行时监控和调整线程池的状态,这对于故障排查和性能调优非常有帮助。 总结来说,Tomcat的线程池源码设计精巧,兼顾了性能与可管理性。通过深入学习和理解...

    tomcat678合集.zip

    这个版本还增强了安全管理器,增加了更多的MBean,使得监控和管理更为便捷。 3. `apache-tomcat-8.0.50.zip`和`apache-tomcat-8.5.29.zip`:这两个版本属于Tomcat 8的不同子版本,Tomcat 8首次支持Java EE 7规范,...

Global site tag (gtag.js) - Google Analytics