- 浏览: 187634 次
- 性别:
- 来自: 杭州
-
文章分类
最新评论
-
cloverprince:
记得小学学过,“按级读,数的中间有多少0都只读一个‘零’,每级 ...
脑残系列之二:汉字转换数字 -
skying007:
...
模糊查询使用对索引的影响(2008.4.11面试) -
j1a1v1a1:
好
谢谢
SQL:根据第二张表字段值更新第一张表字段值(2008.4.11笔试) -
wxq594808632:
String str = "abc";
S ...
字符串反转 -
zhuqx1130:
这个是经典面试题
字符串反转
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Tomcat 5 Startup Sequence Sequence 1. Start from Command Line Class: org.apache.catalina.startup.Bootstrap What it does: a) Set up classloaders commonLoader (common)-> System Loader sharedLoader (shared)-> commonLoader -> System Loader catalinaLoader(server) -> commonLoader -> System Loader b) Load startup class (reflection) org.apache.catalina.startup.Catalina setParentClassloader -> sharedLoader Thread.contextClassloader -> catalinaLoader c) Bootstrap.daemon.init() complete Sequence 2. Process command line argument (start, startd, stop, stopd) Class: org.apache.catalina.startup.Bootstrap (assume command->start) What it does: a) Catalina.setAwait(true); b) Catalina.load() b1) initDirs() -> set properties like catalina.home catalina.base == catalina.home (most cases) b2) initNaming setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY, org.apache.naming.java.javaURLContextFactory ->default) b3) createStartDigester() Configures a digester for the main server.xml elements like org.apache.catalina.core.StandardServer (can change of course :) org.apache.catalina.deploy.NamingResources Stores naming resources in the J2EE JNDI tree org.apache.catalina.LifecycleListener implements events for start/stop of major components org.apache.catalina.core.StandardService The single entry for a set of connectors, so that a container can listen to multiple connectors ie, single entry org.apache.coyote.tomcat5.CoyoteConnector Connectors to listen for incoming requests only It also adds the following rulesets to the digester NamingRuleSet EngineRuleSet HostRuleSet ContextRuleSet b4) Load the server.xml and parse it using the digester Parsing the server.xml using the digester is an automatic XML-object mapping tool, that will create the objects defined in server.xml Startup of the actual container has not started yet. b5) Assigns System.out and System.err to the SystemLogHandler class b6) Calls intialize on all components, this makes each object register itself with the JMX agent. During the process call the Connectors also initialize the adapters. The adapters are the components that do the request pre-processing. Typical adapters are HTTP1.1 (default if no protocol is specified, org.apache.coyote.http11.Http11Protocol) AJP1.3 for mod_jk etc. c) Catalina.start() c1) Starts the NamingContext and binds all JNDI references into it c2) Starts the services under <Server> which are: StandardService -> starts Engine (ContainerBase ->Logger,Loader,Realm,Cluster etc) c3) StandardHost (started by the service) Configures a ErrorReportValvem to do proper HTML output for different HTTP errors codes Starts the Valves in the pipeline (at least the ErrorReportValve) Configures the StandardHostValve, this valves ties the Webapp Class loader to the thread context it also finds the session for the request and invokes the context pipeline Starts the HostConfig component This component deploys all the webapps (webapps & conf/Catalina/localhost/*.xml) Webapps are installed using the deployer (StandardHostDeployer) The deployer will create a Digester for your context, this digester will then invoke ContextConfig.start() The ContextConfig.start() will process the default web.xml (conf/web.xml) and then process the applications web.xml (WEB-INF/web.xml) c4) During the lifetime of the container (StandardEngine) there is a background thread that keeps checking if the context has changed. If a context changes (timestamp of war file, context xml file, web.xml) then a reload is issued (stop/remove/deploy/start) d) Tomcat receives a request on an HTTP port d1) The request is received by a separate thread which is waiting in the PoolTcpEndPoint class. It is waiting for a request in a regular ServerSocket.accept() method. When a request is received, this thread wakes up. d2) The PoolTcpEndPoint assigns the a TcpConnection to handle the request. It also supplies a JMX object name to the catalina container (not used I believe) d3) The processor to handle the request in this case is Coyote Http11Processor, and the process method is invoked. This same processor is also continuing to check the input stream of the socket until the keep alive point is reached or the connection is disconnected. d4) The HTTP request is parsed using an internal buffer class (Coyote Http11 Internal Buffer) The buffer class parses the request line, the headers, etc and store the result in a Coyote request (not an HTTP request) This request contains all the HTTP info, such as servername, port, scheme, etc. d5) The processor contains a reference to an Adapter, in this case it is the Coyote Tomcat 5 Adapter. Once the request has been parsed, the Http11 processor invokes service() on the adapter. In the service method, the Request contains a CoyoteRequest and CoyoteRespons (null for the first time) The CoyoteRequest(Response) implements HttpRequest(Response) and HttpServletRequest(Response) The adapter parses and associates everything with the request, cookies, the context through a Mapper, etc d6) When the parsing is finished, the CoyoteAdapter invokes its container (StandardEngine) and invokes the invoke(request,response) method. This initiates the HTTP request into the Catalina container starting at the engine level d7) The StandardEngine.invoke() simply invokes the container pipeline.invoke() d8) By default the engine only has one valve the StandardEngineValve, this valve simply invokes the invoke() method on the Host pipeline (StandardHost.getPipeLine()) d9) the StandardHost has two valves by default, the StandardHostValve and the ErrorReportValve d10) The standard host valve associates the correct class loader with the current thread It also retrives the Manager and the session associated with the request (if there is one) If there is a session access() is called to keep the session alive d11) After that the StandardHostValve invokes the pipeline on the context associated with the request. d12) The first valve that gets invoked by the Context pipeline is the FormAuthenticator valve. Then the StandardContextValve gets invoke. The StandardContextValve invokes any context listeners associated with the context. Next it invokes the pipeline on the Wrapper component (StandardWrapperValve) d13) During the invokation of the StandardWrapperValve, the JSP wrapper (Jasper) gets invoked This results in the actual compilation of the JSP. And then invokes the actual servlet. e) Invokation of the servlet class
http://tomcat.apache.org/tomcat-6.0-doc/architecture/startup.html
发表评论
-
drools内存泄露问题排查分析
2009-12-13 14:12 5085一、现象 某系统使用了drools规则引擎对用 ... -
尝试给SOFA下的一个定义
2009-09-11 18:46 7383OSGI:服务与组件(Components & ... -
输出方法调用堆栈
2009-06-25 16:45 1858Throwable ex = new Th ... -
Tomcat debug模式启动
2008-11-09 21:59 20570在%CATALINA_HOME%\bin\startup.ba ... -
计算java对象大小
2008-10-14 20:43 2963/** * * http://hi.baidu. ... -
jmock入门
2008-10-04 16:45 2524package jmock; import juni ... -
svn回滚版本库
2008-09-20 15:35 3956这种情况下,有多种办法可以进行撤销修改。一般我们推荐用s ... -
实例化BeanFactory三种方法
2008-08-04 22:56 1743package com.test.spring; imp ... -
Spring定时任务
2008-07-30 09:10 1101<bean id="Schedul ... -
去掉重复值IO操作
2008-07-30 09:03 1394import java.io.BufferedReader ... -
基于Eclipse的Equinox框架开发OSGi Bundle应用
2008-07-27 19:35 4249一、创建Plug-in项目:osgiexample pac ... -
树形结构输出对象声明的所有属性键值
2008-07-13 21:01 1516/** * 获得Student对象声明的所有属性键 ... -
java日期处理
2008-04-20 15:32 2920一、获取系统时间两种方法 // 1、java.util ... -
JSR(转载)
2008-03-31 13:14 1184JSR是Java Specification Requests ... -
Java编译器对于String常量表达式的优化(转载)
2008-03-31 13:11 1076首先把问题摆出来,先看这个代码 String a = & ...
相关推荐
tomcat 8.5 的启动过程文字描述和启动过程的时序图描述 1)A text description of the startup procedure 2)A UML sequence diagram of the startup procedure
电动汽车充电站选址定容优化:基于MATLAB建模求解与成本最小化策略,电动汽车充电站选址定容优化:基于MATLAB的最优规划模型及初学者指南,电动汽车充电站的最优选址定容MATLAB程序 以规划期内充电站的总成本 (包括投资、运行和维护成本)和网损费用之和最小为目标,考虑了相关的约束条件,构造了电动汽车充电站最优规划的数学模型。 从34个位置中,选取7个充电站地址,进行选址优化 关键词:电动汽车;充电站;选址和定容 程序注释清晰,适合初学者学习 ,电动汽车; 充电站选址定容; MATLAB程序; 规划模型; 成本优化; 网损费用; 初学者学习; 程序注释清晰,基于MATLAB的电动汽车充电站选址定容优化程序:成本最小化与约束条件下的选址策略
基于源荷双重不确定性的虚拟电厂日前鲁棒经济调度优化模型基于MATLAB+CPLEX仿真平台求解,基于源荷双重不确定性的虚拟电厂日前鲁棒优化经济调度策略,MATLAB代码:计及源-荷双重不确定性的电厂日前鲁棒优化调度 关键词:电厂 微网调度 鲁棒调度 源荷不确定性 日前经济调度 参考文档:《含电动汽车和风电机组的发电厂竞价策略_杨甲甲》参考其鲁棒模型的化简求解部分,即附录中的鲁棒问题化简求解的全过程; 《Virtual power plant mid-term dispatch optimization》参考燃气轮机、储能部分模型 仿真平台:MATLAB+CPLEX 主要内容:代码主要做的是一个电厂或者微网单元的日前鲁棒经济调度的模型,考虑了光伏出力和负荷功率的双重不确定性,采用鲁棒优化法处理不确定性变量,构建了电厂鲁棒优化调度模型。 具体来看,不确定性考虑的是目标函数以及约束条件中均含有不确定变量,设置鲁棒系数可以调节多重不确定结果,化简的过程也很清晰,程序实现效果良好,一行一注释。 ,关键词:虚拟电厂; 鲁棒优化调度; 源荷不确定性; 日前经济调度; 微网调度; 光伏出力
基于遗传算法的储能优化配置研究:成本模型分析与最优运行计划求解(含风光机组),基于遗传算法的储能优化配置:成本模型分析与最优运行计划求解(含风光机组),MATLAB代码:基于遗传算法的储能优化配置(可加入风光机组) 关键词:储能优化配置 遗传算法 储能充放电优化 参考文档:无明显参考文档,仅有几篇文献可以适当参考 仿真平台:MATLAB 平台采用遗传算法实现求解 优势:代码注释详实,适合参考学习,非目前烂大街的版本,程序非常精品,请仔细辨识 主要内容:建立了储能的成本模型,包含运行维护成本以及容量配置成本,然后以该成本函数最小为目标函数,经过遗传算法求解出其最优运行计划,并通过其运行计划最终确定储能容量配置的大小,求解采用的是遗传算法,求解效果极佳,具体可以看图 ,关键词:MATLAB代码;遗传算法;储能优化配置;储能充放电优化;成本模型;运行维护成本;容量配置成本;最优运行计划;求解效果。,基于遗传算法的储能优化配置MATLAB代码:精细优化与成本最小化研究
如本文所描述,设计模式经典实现、三种其他实现方式以及六个方向的问题优化的详细代码
高性能DSP28335驱动的移相全桥同步整流技术:高效电源输出与轻量级结构设计,基于DSP28335的高效同步整流电源系统:移相全桥驱动,低损耗输出近94%效率,铝基板+平面变压器设计挑战与低成本方案探索,自研DSP28335+移相全桥+纯程序实现同步整流。 目前在DSP固有损耗2W的情况下,输出120W效率接近94%。 就是铝基板+平面变压器玩起来太贵,不好做小批量,335现在也很贵。 基于035的低成本版本近期开始设计~~~ 数字电源demo,输入18-32V,输出12V15A,伍尔特电感+平面变压器+板上平面变压器辅助电源,隔离半桥驱动+隔离采样,用于技术交流和样机平台搭建。 采用上下叠板架构,上板为4层DSP控制板,下板为单层功率铝基板,散热极佳。 ,自研DSP28335; 移相全桥; 纯程序同步整流; 效率接近94%; 低成本版本设计; 数字电源demo; 上下叠板架构; DSP控制板; 散热。,自研DSP28335控制下的同步整流技术优化:效率接近94%的电源解决方案
PPT模板 -星际郎中:守护星际生命.pptx
19考试真题最近的t41.txt
Xilinx公司推出的7系列FPGA中的GTX/GTH收发器是用于高速串行通信的收发器模块,能够实现数据的高速串行传输。本资料为Xilinx提供的用户手册ug476_7Series_Transceivers
GearTrain 提供了灵活的推理框架, 支持视频、图片推理方式。基于 GearTrain 用户可像齿轮一样自由组合各种Pipeline,实现各种推理任务
一个测试的网页布局,作为备份
项目工程资源经过严格测试运行并且功能上ok,可实现复现复刻,拿到资料包后可实现复现出一样的项目,本人系统开发经验充足(全栈全领域),有任何使用问题欢迎随时与我联系,我会抽时间努力为您解惑,提供帮助 【资源内容】:包含源码+工程文件+说明等。答辩评审平均分达到96分,放心下载使用!可实现复现;设计报告也可借鉴此项目;该资源内项目代码都经过测试运行,功能ok 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 【提供帮助】:有任何使用上的问题欢迎随时与我联系,抽时间努力解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 下载后请首先打开说明文件(如有);整理时不同项目所包含资源内容不同;项目工程可实现复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用,资源为网络商品(电子资料类)基于网络商品和电子资料商品的性质和特征不支持退款,质量优质,放心下载使用
内蒙古自治区公共数据资源登记管理暂行办法.docx
MATLAB下基于遗传算法的有序充放电优化策略:实现电动汽车充电费用最低与负荷峰谷平衡,基于遗传算法的电动汽车有序充放电优化策略:精英自适应混合算法实现负荷均衡与费用最小化,MATLAB代码:基于遗传算法的电动汽车有序充放电优化 关键词:遗传算法 电动汽车 有序充电 优化调度 参考文档:《精英自适应混合遗传算法及其实现_江建》算法部分;电动汽车建模部分相关文档太多,自行搜索参考即可; 仿真平台:MATLAB 主要内容:代码主要做的是利用遗传算法对电动汽车有序充电进行优化;优化目标包括充电费用最低,充电时间达到要求(电动汽车充到足够的电)考虑电动汽车充电对电网负荷的影响,使负荷峰谷差最小。 分别利用传统、精英和变异遗传算法进行对比算法优劣,比较迭代结果,优化变量为起始充电时刻 ,关键词:MATLAB代码; 遗传算法; 电动汽车; 有序充电; 优化调度; 充电费用; 充电时间; 电网负荷; 精英自适应混合遗传算法; 迭代结果; 优化变量。,基于遗传算法的电动汽车有序充放电优化调度策略研究
项目工程资源经过严格测试运行并且功能上ok,可实现复现复刻,拿到资料包后可实现复现出一样的项目,本人系统开发经验充足(全栈全领域),有任何使用问题欢迎随时与我联系,我会抽时间努力为您解惑,提供帮助 【资源内容】:包含源码+工程文件+说明等。答辩评审平均分达到96分,放心下载使用!可实现复现;设计报告也可借鉴此项目;该资源内项目代码都经过测试运行,功能ok 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 【提供帮助】:有任何使用上的问题欢迎随时与我联系,抽时间努力解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 下载后请首先打开说明文件(如有);整理时不同项目所包含资源内容不同;项目工程可实现复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用,资源为网络商品(电子资料类)基于网络商品和电子资料商品的性质和特征不支持退款
STM32开发:IIR带阻滤波器设计与实现,含巴特沃斯和切比雪夫滤波器MATLAB程序,STM32开发中IIR带阻滤波器的实现与巴特沃斯滤波器设计详解:附MATLAB程序,STM32开发 IIR带阻滤波器 STM32实现IIR无限冲击响应带阻滤波器设计,巴特沃斯滤波器,代码工整,自编代码,注释详细,赠送巴特沃斯和切比雪夫IIR带阻滤波器MATLAB程序 ,STM32开发; IIR带阻滤波器; 无限冲击响应; 巴特沃斯滤波器; 自编代码; 注释详细; MATLAB程序,STM32中IIR带阻滤波器设计与实现
项目工程资源经过严格测试运行并且功能上ok,可实现复现复刻,拿到资料包后可实现复现出一样的项目,本人系统开发经验充足(全栈全领域),有任何使用问题欢迎随时与我联系,我会抽时间努力为您解惑,提供帮助 【资源内容】:包含源码+工程文件+说明等。答辩评审平均分达到96分,放心下载使用!可实现复现;设计报告也可借鉴此项目;该资源内项目代码都经过测试运行,功能ok 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 【提供帮助】:有任何使用上的问题欢迎随时与我联系,抽时间努力解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 下载后请首先打开说明文件(如有);整理时不同项目所包含资源内容不同;项目工程可实现复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用,资源为网络商品(电子资料类)基于网络商品和电子资料商品的性质和特征不支持退款,质量优质,放心下载使用
包含输入输出,可视化案例。聚类算法
基于PLC的地铁排水控制系统设计:梯形图程序、接线图与IO分配组态全解析,基于PLC的地铁排水控制系统设计:梯形图程序、接线图与IO分配组态全解析,No.505 基于PLC的地铁排水控制系统设计电气控制程序 带解释的梯形图程序,接线图原理图图纸,io分配,组态画面 ,505; PLC地铁排水控制; 电气控制程序; 梯形图程序; 接线图原理图; IO分配; 组态画面,PLC驱动的地铁排水系统设计:电气控制程序详解及图解