<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 53, 文章 - 0, 評論 - 3, 引用 - 0
    數據加載中……

    Tomcat Source Code Reading

    0. I am reading the source code of Tomcat 6.0.26. To pay off the effort,
    I documents some notes for record. Thanks for the articles about Tomcat
    source code, especially the book <<How Tomcat works>>.

    1. They are two concepts about server, one is called Server, which
    is for managing the Tomcat (start and stop); another is called Connector,
    which is the server to serve the application request. they are on the different
    ports. The server.xml clearly show the difference.

    <Server port="8005" shutdown="SHUTDOWN">
      <Service name="Catalina">
        <Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />
        <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

    although the server is the top level element, logically it should not be.
    Actually in code, Bootstrap starts the service first, which
    in turn start the Server and server's services.

    2. My focus in on Connector part. I care how the request is services by the
    Tomcat. Here are some key classes.

    Connector --> ProtocolHandler (HttpProtocol
                            and AjpProtocol)                       --> JIoEndPoint
                                                                               --> Handler(Http11ConnectionHandler
                                                                               and AjpConnectionHandler)
                                                      
                                                      
    3. Connector is most obervious class, but the entry point is not here.
    The sequence is like this.

    Connector.Acceptor.run()
    --> JioEndPoint.processSocke(Socket socket)
        -->SockeProcess.run()
            -->Http11ConnectorHandler.process(Socket socket)
                -->Http11Processor.process(Socket socket)
                    -->CoyoteAdapter.service(Request req, Response res)       

    The core logic is in method Http11Processor.process(Socket socket)                                                  

    CoyoteAdapter.service(Request req, Response res) bridges between Connector module and Container module.

    Any comments are welcome. I may continue the source code reading and dig deeper into it if time permit.


    posted on 2010-03-30 17:11 InPractice 閱讀(617) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 亚洲色图综合在线| 亚洲经典千人经典日产| 亚洲乱码中文字幕综合| 亚洲无线码一区二区三区| 亚洲中文字幕无码久久精品1| 三上悠亚亚洲一区高清| 狠狠色伊人亚洲综合成人| 亚洲bt加勒比一区二区| 亚洲一区二区三区免费观看| 亚洲 欧洲 日韩 综合在线| 亚洲av成人无码网站…| 一级毛片**免费看试看20分钟| 天黑黑影院在线观看视频高清免费 | www.免费在线观看| 国产高清免费视频| 免费网站看v片在线香蕉| 亚洲av无码成人精品区| 久久精品国产亚洲av麻| 亚洲一级毛片免费在线观看| 亚洲AV无码一区二区大桥未久| 亚美影视免费在线观看| 99视频免费播放| 99久久精品日本一区二区免费| 好吊妞在线成人免费| 国产成人亚洲精品91专区手机| 亚洲黄网在线观看| 爱情岛亚洲论坛在线观看| 中文字幕在线免费观看视频| 亚洲性线免费观看视频成熟| 亚洲免费日韩无码系列| 免费国产黄网站在线观看| 日本一道在线日本一道高清不卡免费| 在线日韩日本国产亚洲| 国产精品亚洲专区在线观看| 亚洲免费日韩无码系列| 无码中文在线二区免费| 亚洲国产另类久久久精品小说| 亚洲女女女同性video| 久久精品国产这里是免费| 四虎影视精品永久免费| 亚洲综合久久久久久中文字幕|