<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>lizongbo at 618119.com &#187; APR</title>
	<atom:link href="http://618119.com/tag/apr/feed" rel="self" type="application/rss+xml" />
	<link>http://618119.com</link>
	<description>工作,生活,Android,前端,Linode,Ubuntu,nginx,java,apache,tomcat,Resin,mina,Hessian,XMPP,RPC</description>
	<lastBuildDate>Tue, 31 Jan 2012 14:25:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>慎用ByteBuffer.allocateDirect</title>
		<link>http://618119.com/archives/2008/03/08/74.html</link>
		<comments>http://618119.com/archives/2008/03/08/74.html#comments</comments>
		<pubDate>Sat, 08 Mar 2008 06:06:27 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[apache mina]]></category>
		<category><![CDATA[APR]]></category>
		<category><![CDATA[nio]]></category>

		<guid isPermaLink="false">http://618119.com/archives/2008/03/08/74.html</guid>
		<description><![CDATA[在Apache MINA 2.0.0-M1 试用体会 里我提到了使用 org.apache.mina.transport.socket.apr.AprSocketAcceptor 代替 org.apache.mina.transport.socket.nio.NioSocketAcceptor 遇到的问题, 后来在 AprIoProcessor的 protected int read(AprSession session, IoBuffer buffer) 和 protected int write(AprSession session, IoBuffer buf, int length)方法里加上了System.out，然后瞎改代码， 后面终于看到错误码为：-120002 和-730054,在网上google一番，也没有头绪，后面静下心来，增加对IoBuffer的方法调用， 慢慢摸索。 联想到前面ProtocolDecoder所犯下用把while用成if的错误，想想这么容易出现问题的话，应该不是bug，Trustin Lee 这样的牛人不可能留下这么大的bug就发布 Apache MINA 2.0.0-M1。 通过多次定位，终于发现了问题所在， 我在 ProtocolEncoder的 public void encode(IoSession session, Object message, ProtocolEncoderOutput out)里面写了 IoBuffer buf = IoBuffer.allocate(16, true); 这行代码最终调用的是ByteBuffer.allocateDirect这个方法： 参考： http://gceclub.sun.com.cn/Java_Docs/jdk6/html/zh_CN/api/java/nio/ByteBuffer.html#allocateDirect(int) 先前瞎迷信自以为 [...]]]></description>
		<wfw:commentRss>http://618119.com/archives/2008/03/08/74.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>tomcat启用apr的情况下使用非自签名证书进行ssl双向认证配置</title>
		<link>http://618119.com/archives/2007/10/23/13.html</link>
		<comments>http://618119.com/archives/2007/10/23/13.html#comments</comments>
		<pubDate>Tue, 23 Oct 2007 00:47:27 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[-12227]]></category>
		<category><![CDATA[APR]]></category>
		<category><![CDATA[clientAuth]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[openssl]]></category>

		<guid isPermaLink="false">http://618119.com/archives/2007/10/23/13.html</guid>
		<description><![CDATA[Tomcat的apr组件是使用JNI用来提升Tomcat的系统性能，在启用apr特性之后，Tomcat的 https功能不能使用JSSE的证书配置， 而需要使用OpenSSL,对于clientAuth的双向认证配置，也与一般方式不同，经过试验，摸索出配置步骤如下： 证书文件的制作步骤如下: 下载并安装openvpn,然后在 C:\Program Files\OpenVPN\easy-rsa下根据readme指导的步骤生成根证书,服务器证书(非自签名证书),客户端证书. 我的具体步骤: 1.命令行下进入 C:\Program Files\OpenVPN\easy-rsa 首先运行init-config.bat 当前目录下会生成openssl.cnf和vars.bat 2.编辑vars,bat,修改以下变量,保存文件. set KEY_SIZE=2048 set KEY_COUNTRY=CN set KEY_PROVINCE=GD set KEY_CITY=ShenZhen set KEY_ORG=zongbo.Inc set KEY_EMAIL=lizongbo@618119.com 3.命令行下运行 vars.bat clean-all 4.创建ca证书 1. vars 2. build-ca 5.创建服务器公匙密码 (由于KEY_SIZE设置成了2048,因此可能需要很长的是时间才能创建,此时可以改回1024) 1. vars 2. build-dh 6.创建服务器证书和key. 1. vars 2. build-key-server www 7.创建客户端证书(创建可导入的格式) 1. vars 2. build-key-pkcs12 lizongbo 以下是整个命令执行的过程 C:\Program Files\OpenVPN\easy-rsa&#62;init-config [...]]]></description>
		<wfw:commentRss>http://618119.com/archives/2007/10/23/13.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

