摘要: leveldb 是看着前辈们的大概分析,然后看着源码,将自己的疑惑和解决记录下来:Leveldb源码分析从memberTable插入一条记录和查找一条记录从上而下分析插入:插入的函数void MemTable::Add(SequenceNumber s, ValueType type,const S... 阅读全文
posted @ 2015-12-06 20:18 Xuyung 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 在之前的章节都是通过Bootstrap类来初始化connector,context,wrapper。而且手动来绑定它们的关系。connector.setContainer(context);或者手动设置实例的属性context.setPath("/myApp") ;context.setDocBas... 阅读全文
posted @ 2015-11-01 11:14 Xuyung 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 之前的章节是将container和connector联系了在一起,但是connector只能和一个端口相连接。而且,之前的application都缺少了一个开启服务,关闭服务的接口。这章节就是介绍tomcat的server和service。server和service就是方便了启动。Serveror... 阅读全文
posted @ 2015-10-25 16:05 Xuyung 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Host和Engine是container的其中一种。如果想要tomcat能够包含多个网站,则需要Host来包含多个context。1.HostThe Host 接口public interface Host extends Container { public static final S... 阅读全文
posted @ 2015-10-18 11:06 Xuyung 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 一个context代表一个web网站,一个context包含多个wrappers。这个章节介绍了catalina的standardContext。一、StandardContext ConfigurationstandardContext Configuration是配置standardContex... 阅读全文
posted @ 2015-10-11 11:52 Xuyung 阅读(131) 评论(0) 推荐(0) 编辑
摘要: tomcat 4和5中有四种container,engine,host,context,wrapper,之前已经简单介绍过自己编写的simpleContext,simpleWrapper。这章节就是介绍catalina的StandardWrapper。首先wrapper是代表一个servlet,所以... 阅读全文
posted @ 2015-09-21 09:51 Xuyung 阅读(139) 评论(0) 推荐(0) 编辑
摘要: security是当请求一些需要用户认证的content时起作用的,security通过Authenticator类来实现。Authenticator是继承了ValueBase的,在content的pipeline时触发认证,如果失败就不会进行下一步操作。而Authenticator则是通过real... 阅读全文
posted @ 2015-09-13 10:21 Xuyung 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Catalina版本的Tomcat通过manager板块来提供session管理,manager通常是和context联系在一起,就是context类里会有一个manager实例。Session interfacepublic interface Session { public stati... 阅读全文
posted @ 2015-09-06 10:58 Xuyung 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Chapter 6在tomcat 中有很多的组件,这些组件会启动,会在关闭的时候做一些清除的工作,所以就需要Lifecycle这个组件来扩展。Lifecycle主要包括三部分1、The Lifecycle Interface要使用lifecycle的组件,需要实现这个接口,这样就可以开启或关闭lif... 阅读全文
posted @ 2015-08-23 18:24 Xuyung 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Containner的作用是将请求送到servlet中,然后产生response给客户端。在tomcat 4中,container有四种:Enginer,Host,Context,和 Wrapper。这个章节主要是简单介绍下Context和Wrapper,其中的Context和Wrapper都是自定... 阅读全文
posted @ 2015-08-09 16:51 Xuyung 阅读(175) 评论(0) 推荐(0) 编辑