Bootstrap Catalina Digester ServerLifecycleLis... GlobalResourcesLife... SecurityConfig MBeans Bootstrap Catalina Digester ServerLifecycle GlobalResources Listener LifecycleListener SecurityConfig initClassLoaders() newInstance() setParentClassLoader() load() initDirs() initNaming() initialize() parse server.xml createDigester() parse() newInstance() newInstance() newInstance() setPackageDefinition() setPackageAccess() #1Catalina.load() File: C:\Documents and Settings\Administrator\Desktop\Tomcat_5_UML.mdl View / 1. catalina_load Page 1 3:05:37 PM Monday, December 16, 2002 Sequence Diagram: Logical Catalina StandardServer StandardService CoyoteConnector Catalina StandardServer StandardServic e CoyoteConnect or CoyoteAdapter Http11Protocol JkCoyoteAdapter CoyoteAdapter Http11Protocol JkCoyoteAdapt er initialize() initialize() initialize() new() new() init() new() init() #2 Catalina.initialize() File: C:\Documents and Settings\Administrator\Desktop\Tomcat_5_UML.mdl View / 2. catalina_initliaze Page 2 3:05:37 PM Monday, December 16, 2002 Sequence Diagram: Logical Bootstrap Catalina Bootstrap Catalina start() StandardServer StandardService StandardEngine StandardServer StandardServic e StandardEngine StandardHost StandardPipeline StandardHost StandardPipeline start() fireLifecycleEvent(BEFORE_START_EVENT) fireLifecycleEvent(START_EVENT) start() fireLifecycleEvent(BEFORE_START_EVENT) fireLifecycleEvent(START_EVENT) start() fireLifecycleEvent(BEFORE_START_EVENT) addDefaultMapper() logger.start() realm.start() #1 Catalina.start() findMappers() All StandardX will fire these events. findChildren() start() fireLifecycleEvent(BEFORE_START_EVENT) addDefaultMapper() logger.start() findMapper() findChildren() start() fireLifecycleEvent(AFTER_EVENT) fireLifecycleEvent(BEFORE_START_EVENT) fireLifecycleEvent(START_EVENT) File: C:\Documents and Settings\Administrator\Desktop\Tomcat_5_UML.mdl View / 3. catalina_start Page 3 (1, 1) 3:05:37 PM Monday, December 16, 2002 Sequence Diagram: Logical StandardHost HostConfig StandardHostDeployer Digester ContextRuleSet StandardHost HostConfig StandardHostDeployer Digester NamingRuleSet ContextRuleSet NamingRuleSet fireLifecycleEvent(START_EVENT) interested[i].lifecycleEvent() setDeployXML() setLiveDeploy() setUnpacksWar() setXMLValidation() deployDescriptors() install() install() create() new() add(ContextRuleSet) deployApps() install() new() add(NamingRuleSet()) parse() install() // same as above #2 Catalina.start() File: C:\Documents and Settings\Administrator\Desktop\Tomcat_5_UML.mdl View / 4. catalina_start_2 Page 5 3:05:37 PM Monday, December 16, 2002 Sequence Diagram: Logical Digester Rule StandardContext StandardPipeline StandardContextV... SetPropertiesRule SetNextRule SetPropertiesRule SetNextRule HostConfig.deployDescriptor() Digester Rule StandardContext StandardPipeline StandardContext Valve parse startElement() begin() newInstance() new() setBasic(StandardContextValve) begin() //Using BeanUtil, set the object properties (from ex: admin.xml) end() #3 Catalina.start() File: C:\Documents and Settings\Administrator\Desktop\Tomcat_5_UML.mdl View / 5. catalina_start_3 Page 6 (1, 1) 3:05:37 PM Monday, December 16, 2002 Sequence Diagram: Logical Digester StandardHostDeplo... StandardHost StandardContext WebappLoader StandardManager ContextConfig StandardWrapper Deploy App. Digester StandardHostDe StandardHost ployer StandardContex WebappLoader StandardManag t er StandardWrapp er parse ContextConfig startElement() addChild addChild start() new setLoader new setManager fireLifecycleEvent(START_EVENT) // Notify interested LifecycleListeners start() start() defaultConfig() applicationConfig() create() // Process web.xml * tld.xml createWarpper() // Invoked by a WebWrapperRule (not Directly by the Digester) new addInstanceListener() addLifecycleListener() addContainerListener() File: C:\Documents and Settings\Administrator\Desktop\Tomcat_5_UML.mdl View / 6. catalina_start_4 Page 8 (1, 1) 3:05:37 PM Monday, December 16, 2002 Sequence Diagram: Logical