tomcat server容器解读
来源:互联网 发布:手机旋律合成软件 编辑:程序博客网 时间:2024/06/06 10:18
1. server的实例类为:org.apache.catalina.core.StandardServer为顶层容器。
2.二级容器GlobalNamingResources,设置认证用户信息。
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
3. 二级容器service,包括了多个connector和一个engine
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<Connector port="8080"protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Catalina"defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina"defaultHost="localhost">
3. 三级容器Engine包括Realm和Host。
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentationat:
/docs/cluster-howto.html (simplehow to)
/docs/config/cluster.html (reference documentation) -->
<!--
<ClusterclassName="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- Use theLockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in theglobal JNDI
resources under the key"UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication betweenweb applications
Documentation at: /docs/config/valve.html -->
<!--
<ValveclassName="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common"-->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t"%r" %s %b" />
</Host>
</Engine>
实现类关系
Event-Listerner事件监听模式
事件监听同步模式分两个部分:Event Source和Event Listener:
Event Source:被监听者的事件集合,可能是方法,提供事件的注册加入和移除功能。类似被观察者的集合。
Event Listener:事件的监听者,当事件被触发,所有监听这个事件的监听者将被通知,然后执行自己的Action响应动作。
事件监听异步模式在Source和Listener之间引入event queue,
event queue是一个基于事件的publish-subscribe. 它一种松耦合方式提供不同模块和角色之间异步通讯。它比同步更加松耦合,这样,我们就把Source-Listener改成了publish-queue-subscribe方式。
- tomcat server容器解读
- Tomcat----解读server.xml
- 解读Tomcat服务器server.xml文件
- tomcat下的server.xml文件解读
- 【未完成】Web容器:Tomcat web server
- web server 容器 tomcat和jetty的奇怪联系
- c++容器解读
- C++ STL容器解读
- tomcat容器
- Tomcat 容器
- 【Tomcat】Tomcat源码解读系列(一)——server.xml文件的配置
- Tomcat源码解读系列(一)——server.xml文件的配置
- Tomcat源码解读系列(一)——server.xml文件的配置
- tomcat startup.bat解读
- tomcat startup.bat解读
- tomcat startup.bat 解读
- TOMCAT目录结构解读
- Tomcat Catalina.bat解读
- tomcat架构之-----基本概念
- fully qualified host name就是fully qualified domain name
- Socket桥(转载)
- 发散 求1-100的和的方法
- android 辅助工具类——文件简单操作辅助类
- tomcat server容器解读
- tomcat 容器生命周期lifecycle
- Java Management extentsions(jmx)与tomcat
- 转载--tomcat整合apr
- 转载--redis密码管理
- 转载----How fast is Redis?
- 结构体的内存对齐问题
- select语句for update---转载
- BEA-141150 - An error occurred while preparing application component uri of application application with HTTP response responseC