Tomcat生命周期管理

Tomcat 包含多个很多个组件, Tomcat 内部使用一个观察者模式来组织这些组件之间的关系,做到同时启动与停止 。
[quote]cmd /c D:\tomcat-8080\bin\catalina.bat run
Using CATALINA_BASE: C:\Documents and Settings\liuwentao\.IntelliJIdea10\system\tomcat\Unnamed_newclass2009_3
Using CATALINA_HOME: D:\tomcat-8080
Using CATALINA_TMPDIR: D:\tomcat-8080\temp
Using JRE_HOME: D:\Java\jdk1.6.0_03
Connected to the target VM, address: '127.0.0.1:1958', transport: 'socket'
2011-8-3 13:13:06 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Java\jdk1.6.0_03\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\Program Files\JetBrains\IntelliJ IDEA 10.5\bin\..\.\bin;D:\Java\jdk1.6.0_03\bin;E:\oracle\product\10.2.0\db_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;D:\Program Files\TortoiseSVN\bin;C:\Program Files\CVSNT\;d:\program files\jetbrains\intellij idea 10.5\jre\jre\bin
2011-8-3 13:13:06 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2011-8-3 13:13:06 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 541 ms

2011-8-3 13:13:06 [size=x-large]org.apache.catalina.core.StandardService start[/size]
信息: Starting service Catalina

2011-8-3 13:13:06 [size=x-large]org.apache.catalina.core.StandardEngine start[/size]
信息: Starting Servlet Engine: Apache Tomcat/6.0.14

2011-08-03 13:13:16,632 WARN [com.koolearn.security.client.core.BeforeContextLoaderListener.dealSysGlobal(BeforeContextLoaderListener.java:79)] - <******file = SystemGlobals_liuwentao.properties>
2011-08-03 13:13:16,679 WARN [com.koolearn.security.client.core.BeforeContextLoaderListener.contextInitialized(BeforeContextLoaderListener.java:45)] - <SystemGlobals.getPreference("2 hosts.security") = http://liuwentao:81>
2011-08-03 13:13:16,679 WARN [com.koolearn.security.client.core.BeforeContextLoaderListener.contextInitialized(BeforeContextLoaderListener.java:46)] - <SystemGlobals.getPreference("2 hosts.domain") = http://liuwentao:8080>
2011-08-03 13:13:26,023 WARN [org.springframework.security.intercept.AbstractSecurityInterceptor.afterPropertiesSet(AbstractSecurityInterceptor.java:190)] - <Could not validate configuration attributes as the ObjectDefinitionSource did not return a ConfigAttributeDefinition collection>
2011-08-03 13:13:26,038 WARN [org.springframework.security.config.FilterChainProxyPostProcessor.checkForDuplicates(FilterChainProxyPostProcessor.java:117)] - <Possible error: Filters at position 11 and 12 are both instances of org.springframework.security.intercept.web.FilterSecurityInterceptor>
2011-08-03 13:13:27,632 ERROR [com.koolearn.eclass.product.utils.ChannelUtils.parseXml(ChannelUtils.java:123)] - <this.getRootElement(D:\project\koolearn2010\newclass2009\WebRoot\channel\channel_book.xml)=null>
2011-08-03 13:13:28,038 WARN [org.springframework.security.intercept.AbstractSecurityInterceptor.afterPropertiesSet(AbstractSecurityInterceptor.java:190)] - <Could not validate configuration attributes as the ObjectDefinitionSource did not return a ConfigAttributeDefinition collection>
2011-08-03 13:13:28,038 WARN [org.springframework.security.config.FilterChainProxyPostProcessor.checkForDuplicates(FilterChainProxyPostProcessor.java:117)] - <Possible error: Filters at position 11 and 12 are both instances of org.springframework.security.intercept.web.FilterSecurityInterceptor>
you must set sso.loginURL!
finished init
2011-8-3 13:13:29 net.fckeditor.connector.ConnectorServlet init
信息: ConnectorServlet successfully initialized!

2011-8-3 13:13:30 [size=x-large]org.apache.coyote.http11.Http11Protocol start[/size]
信息: Starting Coyote HTTP/1.1 on http-8080
2011-8-3 13:13:30 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009

2011-8-3 13:13:30 [size=x-large]org.apache.jk.server.JkMain start[/size]
信息: Jk running ID=0 time=0/31 config=null

2011-8-3 13:13:30 [size=x-large]org.apache.catalina.startup.Catalina start[/size]

信息: Server startup in 23950 ms
Connected to server
[/quote]
它的启动顺序:
[quote]StandardService --> StandardEngine-->Http11Protocol-->JkMain-->Catalina[/quote]

tomcat 是点火式引擎,由org.apache.catalina.startup.Bootstrap 这个类来点燃整个系统的启动。

启动顺序为:
[quote]Server{init()-->start()} --> Service{start()} --> Connector(start()) --> Engine{start()} --> Host{start()} --> Context{start()} [/quote]

[b]Tomcat Server的结构图[/b]
[img]http://dl.iteye.com/upload/attachment/529762/a65487f7-4627-3796-ae8c-8226b865274f.gif[/img]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值