hti 发表于 2017-2-10 12:31:16

Tomcat源码解读--代码走读之(十九的4)StandardService. start(二十)

  1、setStateInternal(LifecycleState.STARTING_PREP, null, false),其中listeners为0,所以在改阶段没有动作。
  2、startInternal(),内容如下图。
  

 
  (1)、setState(LifecycleState.STARTING),因listeners的数量为0,所以此阶段没有动作。
  (2)、container.start(),Engine的启动,后续介绍。
  (3)、executor.start(),executors为空,在此阶段没有动作。
  (4)、connector.start(),连接的启动http/1.1和AJP/1.3,后续介绍。
  3、setStateInternal(LifecycleState.STARTED,null, false),其中StandardService的listeners为0,所以在改阶段没有动作。
 
页: [1]
查看完整版本: Tomcat源码解读--代码走读之(十九的4)StandardService. start(二十)