<?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; https</title>
	<atom:link href="http://618119.com/tag/https/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>扩展java.net.URL支持自定义协议来优化hessian的调用</title>
		<link>http://618119.com/archives/2009/01/11/126.html</link>
		<comments>http://618119.com/archives/2009/01/11/126.html#comments</comments>
		<pubDate>Sun, 11 Jan 2009 14:51:17 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Hessian]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[RPC]]></category>
		<category><![CDATA[URL]]></category>
		<category><![CDATA[URLStreamHandler]]></category>
		<category><![CDATA[URLStreamHandlerFactory]]></category>

		<guid isPermaLink="false">http://618119.com/?p=126</guid>
		<description><![CDATA[扩展java.net.URL支持自定义协议来优化hessian调用 hessian是个高性能的java RPC调用协议，但是官方默认只提供了基于http和https两种方式的远程调用。 虽然每天使用http方式调用上千万次也没出现性能问题，(有jdk一份功劳，jdk1.5及以上版本支持了http.KeepAlive， 默认设置为： http.KeepAlive.remainingData=512 http.KeepAlive.queuedConnections=10) 但是如果能够改成tcp纯socket长连接池方式，性能是还可以优化的，因为把http的header头信息给省了七七八八。 由于hessian使用的URL和URLConnection来发送hessian请求和应答的，而URL的协议处理是可以扩展的, 因此可以通过扩展URL支持自定义协议来灵活切换hessian使用http或者tcp或者udp方式进行请求发送和接收应答。 查找相关资料后整理了三种扩展方法： 1.通过用户指定的package名称的最后一位作为协议名称（包名要是小写的）。 例如我自定义了三个协议,hessiantcp,hessianudp,hessiantcpudp； 则需要建立三个继承java.net.URLStreamHandler的Handler类(实现类的名字必须是Handler). 即： com.lizongbo.hessian.protocol.hessiantcp.Handler.java com.lizongbo.hessian.protocol.hessianudp.Handler.java com.lizongbo.hessian.protocol.hessiantcpudp.Handler.java 在运行时，还要指定系统属性java.protocol.handler.pkgs 或者在java命令行里增加启动参数： -Djava.protocol.handler.pkgs=com.lizongbo.hessian.protocol（多个包名之间用竖线隔开，例如: -Djava.protocol.handler.pkgs=com.lizongbo.hessian.protocola&#124;com.lizongbo.hessian.protocolb） 或者在代码里调用创建URL之前，先执行： [code] System.setProperty("java.protocol.handler.pkgs","com.lizongbo.hessian.protocol"); URL serviceUrl = new URL("hessiantcp://618119.com/blog/hessian/service"); [/code] 这样，用户便能够通过URL对象处理hessiantcp://这样的协议了， 否则，使用hessiantcp://这样的协议会导致异常。 参考：http://www.tuscany.org.cn/index.php/Tuscany与JBoss集成中遇到的问题及排除 和http://java.sun.com/developer/onlineTraining/protocolhandlers/ 2.设置指定的URLStreamHandlerFactory也可以扩展自定义的协议。 [code] package com.lizongbo.hessian.protocol; import java.net.*; import java.util.Hashtable; class HessianURLStreamHandlerFactory implements URLStreamHandlerFactory { private String packagePrefix = "com.lizongbo.hessian.protocol"; protected static [...]]]></description>
		<wfw:commentRss>http://618119.com/archives/2009/01/11/126.html/feed</wfw:commentRss>
		<slash:comments>3</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>
		<item>
		<title>seo</title>
		<link>http://618119.com/seo</link>
		<comments>http://618119.com/seo#comments</comments>
		<pubDate>Sat, 20 Oct 2007 15:16:32 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[yodao]]></category>
		<category><![CDATA[有道]]></category>

		<guid isPermaLink="false">http://618119.com/seo</guid>
		<description><![CDATA[基于Wordpress的搜索引擎步骤 1.使用独立的域名. 2.安装Sitemap插件. 3.添加robots.txt 4.到Google去提交网站地址: http://www.google.com/addurl/?hl=zh-CN 5.到百度去提交网站地址: http://utility.baidu.com/addurl/validcode.php 6.到yahoo去提交网站地址: https://siteexplorer.search.yahoo.com/submit (提交sitemap) 7.注册feedsky.生成feed. 8.在曾经的blog记录新的blog地址. 参考: http://www.todocn.com/blog/article.asp?id=671 http://www.adsenser.org/show-607-1.html 安装了 有道相关博文推荐 插件(有道通过分析文章内容，自动推荐相关博客文章) 安装了 Simple Tags 插件。 Tags: https, seo, Wordpress, yodao, 有道]]></description>
		<wfw:commentRss>http://618119.com/seo/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

