当前位置:首页 > 开发 > 行业应用 > 正文

Tomcat生命周期管理

发表于: 2011-08-03   作者:wentao365   来源:转载   浏览次数:
摘要: Tomcat包含多个很多个组件,Tomcat内部使用一个观察者模式来组织这些组件之间的关系,做到同时启动与停止。引用cmd/cD:\tomcat-8080\bin\catalina.batrunUsingCATALINA_BASE:  C:\DocumentsandSettings\liuwentao\.IntelliJIdea10\system\tomcat\Unnamed_newclass20
Tomcat 包含多个很多个组件, Tomcat 内部使用一个观察者模式来组织这些组件之间的关系,做到同时启动与停止 。
引用
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 org.apache.catalina.core.StandardService start
信息: Starting service Catalina

2011-8-3 13:13:06 org.apache.catalina.core.StandardEngine start
信息: 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 org.apache.coyote.http11.Http11Protocol start
信息: 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 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/31  config=null

2011-8-3 13:13:30 org.apache.catalina.startup.Catalina start

信息: Server startup in 23950 ms
Connected to server

它的启动顺序:
引用
StandardService --> StandardEngine-->Http11Protocol-->JkMain-->Catalina


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

启动顺序为:
引用
Server{init()-->start()} --> Service{start()} --> Connector(start()) --> Engine{start()} --> Host{start()} --> Context{start()}


Tomcat Server的结构图
Tomcat生命周期管理_第1张图片

Tomcat生命周期管理

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
本文主要结合观察者模式,讲述Tomcat的生命周期管理。Tomcat的生命周期管理机制设计的非常优雅,在T
本文主要结合观察者模式,讲述Tomcat的生命周期管理。Tomcat的生命周期管理机制设计的非常优雅,在T
一,tomcat中每一个容器都有其生命周期,初始化/启动/结束 等,可以在各自的生命周期内的步骤中进行
首先,测试人员发现 BUG ,做好记录并上报至 BUG 数据库。接着,开发组长或经理确定该 BUG 是否有效
1 JPA状态转换图 要理解JPA的核心接口,这个图必须牢记。 分为4种状态: 1)New状态:未有id,未与Pe
1 JPA状态转换图 要理解JPA的核心接口,这个图必须牢记。 分为4种状态: 1)New状态:未有id,未与Pe
1 JPA状态转换图 要理解JPA的核心接口,这个图必须牢记。 分为4种状态: 1)New状态:未有id,未与Pe
1 JPA状态转换图 要理解JPA的核心接口,这个图必须牢记。 分为4种状态: 1)New状态:未有id,未与Pe
Java对象的生命周期,从初始化到销毁如下: Object obj = new Object(); obj.setXXX(); obj.getXXX();
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号