前言
整理這個官方翻譯的系列,原因是網上大部分的 tomcat 版本比較舊,此版本爲 v11 最新的版本。
開源項目
從零手寫實現 tomcat minicat 別稱【嗅虎】心有猛虎,輕嗅薔薇。
系列文章
web server apache tomcat11-01-官方文檔入門介紹
web server apache tomcat11-02-setup 啓動
web server apache tomcat11-03-deploy 如何部署
web server apache tomcat11-04-manager 如何管理?
web server apache tomcat11-06-Host Manager App -- Text Interface
web server apache tomcat11-07-Realm Configuration
web server apache tomcat11-08-JNDI Resources
web server apache tomcat11-09-JNDI Datasource
web server apache tomcat11-10-Class Loader
...
介紹
Tomcat 使用 JMX MBeans 技術來實現對 Tomcat 的可管理性。
Catalina 的 JMX MBeans 描述在每個包中的 mbeans-descriptors.xml 文件中。
您需要爲自定義組件添加 MBean 描述,以避免出現 "ManagedBean is not found" 異常。
添加 MBean 描述
您也可以在與其描述的類文件相同的包中的 mbeans-descriptors.xml 文件中爲自定義組件添加 MBean 描述。
mbeans-descriptors.xml 的允許語法由 DTD 文件定義。
自定義 LDAP 認證 Realm 的條目可能如下所示:
<mbean name="LDAPRealm"
className="org.apache.catalina.mbeans.ClassNameMBean"
description="Custom LDAPRealm"
domain="Catalina"
group="Realm"
type="com.myfirm.mypackage.LDAPRealm">
<attribute name="className"
description="Fully qualified class name of the managed object"
type="java.lang.String"
writeable="false"/>
<attribute name="debug"
description="The debugging detail level for this component"
type="int"/>
.
.
.
</mbean>