<?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; cache</title>
	<atom:link href="http://618119.com/category/cache/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>jsp拦截JspWriter实现类似php的ob_get_contents</title>
		<link>http://618119.com/archives/2009/04/06/144.html</link>
		<comments>http://618119.com/archives/2009/04/06/144.html#comments</comments>
		<pubDate>Mon, 06 Apr 2009 14:29:55 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[cache]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[JspWriter]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[缓存]]></category>

		<guid isPermaLink="false">http://618119.com/?p=144</guid>
		<description><![CDATA[jsp拦截JspWriter实现类似php的ob_get_contents php可以通过ob_start和ob_get_contents可以拦截并得到echo等方式输出的内容，并可以方便的进行二次处理。java的jsp也是可以非常方便就实现这样的功能，那就是实现一个自定义的JspWriter. oscache的功能强大的jsp缓存标签就是这样干的。 前段时间作了个简单的rss输出，由于避免访问量过大影响到数据库和接口调用。 于是需要对生成的rss文本进行缓存。原有的jsp代码都已经写好，大概动就太麻烦了，于是用TextJspWriter继承javax.servlet.jsp.JspWriter，然后在jsp作小改造就搞定了。 php的用法参考： http://cn2.php.net/ob_get_contents TextJspWriter.java的代码为： [code] package com.lizongbo.util; import java.io.IOException; import java.io.StringWriter; import javax.servlet.jsp.JspWriter; public class TextJspWriter extends JspWriter { public String getString() { return sb.toString(); } private StringBuilder sb = null; public TextJspWriter() { this(8192, true); } public TextJspWriter(int bufferSize, boolean autoFlush) { super(bufferSize, autoFlush); sb=new StringBuilder(bufferSize); } @Override public void [...]]]></description>
		<wfw:commentRss>http://618119.com/archives/2009/04/06/144.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>体验OpenFire3.4.2的集群功能</title>
		<link>http://618119.com/archives/2007/12/12/44.html</link>
		<comments>http://618119.com/archives/2007/12/12/44.html#comments</comments>
		<pubDate>Wed, 12 Dec 2007 07:28:25 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[cache]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[coherence]]></category>
		<category><![CDATA[IM]]></category>
		<category><![CDATA[OpenFire]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[spark]]></category>
		<category><![CDATA[集群]]></category>

		<guid isPermaLink="false">http://618119.com/archives/2007/12/12/44.html</guid>
		<description><![CDATA[体验OpenFire3.4.2的集群功能 曾经因为学习xmpp的时候关注了openfire,那时候还叫WildFire, 曾经照虎画猫用lumaqq写了个qq插件,后来没时间也就没看了. OpenFire 3.4.2发布了,在3.4开始就支持了集群功能, changelog在: http://www.igniterealtime.org/builds/openfire/docs/latest/changelog.html 相关下载链接为: http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_4_2.zip http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_src_3_4_2.zip http://www.igniterealtime.org/downloadServlet?filename=smack/smack_src_3_0_4.zip http://www.igniterealtime.org/downloadServlet?filename=spark/online/spark_2_5_8_online.exe http://www.igniterealtime.org/downloadServlet?filename=connectionmanager/connection_manager_src_3_4_2.zip http://www.igniterealtime.org/downloadServlet?filename=connectionmanager/connection_manager_3_4_2.zip 上面的下载连接不支持断点续传. http://www.igniterealtime.org/projects/openfire/plugins/asterisk-im.jar http://www.igniterealtime.org/projects/openfire/plugins/broadcast.jar http://www.igniterealtime.org/projects/openfire/plugins/contentFilter.jar http://www.igniterealtime.org/projects/openfire/plugins/sip.jar http://www.igniterealtime.org/projects/openfire/plugins/gateway.jar http://www.igniterealtime.org/projects/openfire/plugins/presence.jar http://www.igniterealtime.org/projects/openfire/plugins/registration.jar http://www.igniterealtime.org/projects/openfire/plugins/search.jar http://www.igniterealtime.org/projects/openfire/plugins/subscription.jar http://www.igniterealtime.org/projects/openfire/plugins/userImportExport.jar http://www.igniterealtime.org/projects/openfire/plugins/userservice.jar http://www.igniterealtime.org/projects/openfire/plugins-beta/filetransferdisabler.jar http://www.igniterealtime.org/projects/openfire/plugins-beta/red5.war http://www.igniterealtime.org/projects/openfire/plugins-beta/vcard.jar http://www.igniterealtime.org/projects/openfire/plugins/enterprise.jar http://www.igniterealtime.org/projects/openfire/plugins/webchat.war 配置openfire的启动参数,比如设置内存, 如果是用openfired.exe启动,则在D:\Java\openfire\bin创建openfired.vmoptions 内容为: -Xms64m -Xmx256m 如果是用openfire-service.exe进去启动的,则创建openfire-service.vmoptions. 测试了一下集群功能,openfire clustering特性用的是被Oracle收购的coherence来实现的,授权用的Tangosol Coherence: Application Edition. tangosol-license.jar中有licensee信息, coherence的下载地址在: http://download.oracle.com/otn/java/coherence/coherence-331.zip 来源: http://www.oracle.com/technology/software/products/ias/htdocs/coherence.html Tags: coherence, IM, OpenFire, Oracle, spark, 集群]]></description>
		<wfw:commentRss>http://618119.com/archives/2007/12/12/44.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jgroups配置与使用的学习笔记</title>
		<link>http://618119.com/archives/2007/11/24/29.html</link>
		<comments>http://618119.com/archives/2007/11/24/29.html#comments</comments>
		<pubDate>Sat, 24 Nov 2007 06:56:01 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JbossCache]]></category>
		<category><![CDATA[JGroups]]></category>

		<guid isPermaLink="false">http://618119.com/archives/2007/11/24/29.html</guid>
		<description><![CDATA[Jgroups配置与使用的学习笔记 1.相关资料: 关于jgroups有几篇很好的中文介绍文章： Rene Xu 的《Multicast and JGroups（未完待续）》 http://renexu.blogspot.com/2006/08/multicast-and-jgroups_28.html 还有Tim 的《JGroups 简介、适用场合、配置、程序例子Demo等完全使用指南》 http://hi.baidu.com/jabber/blog/item/7e879852a23efd0f0cf3e3ea.html 和Puras 的《JGroups之皮毛》 http://www.javaeye.com/post/292587 IP组播技术概述的资料： http://net.pku.edu.cn/webCourse/ppt/lec14.pdf jgroups的向导： http://www.jgroups.org/javagroupsnew/docs/tutorial/html_single/index.html jgroups的用户手册： http://www.jgroups.org/javagroupsnew/docs/manual/html_single/index.html 2.jgroups 2.5及以上版本要求的jdk最低版本至少为JDK5.0，最小依赖的库文件为：commons-logging.jar, jgroups-all.jar是一个包含了demo和junit单元测试用例的jar,如果想得到精简了的jar， 则可以下载源代码下来，使用 jar 任务编译得到jgroups-core.jar 操作步骤如下，解压JGroups-2.5.0.src.zip，得到D:\Java\JGroups-2.5.0.src。 然后命令行下运行build jar。 [code] D:\Java\JGroups-2.5.0.src\lib&#62;cd .. D:\Java\JGroups-2.5.0.src&#62;build jar Buildfile: build.xml prepare: [mkdir] Created dir: D:\Java\JGroups-2.5.0.src\classes [mkdir] Created dir: D:\Java\JGroups-2.5.0.src\dist [mkdir] Created dir: D:\Java\JGroups-2.5.0.src\dist\javadoc compile: [javac] Compiling 508 [...]]]></description>
		<wfw:commentRss>http://618119.com/archives/2007/11/24/29.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JBossCache 2.0.0的使用及注意事项</title>
		<link>http://618119.com/archives/2007/11/05/22.html</link>
		<comments>http://618119.com/archives/2007/11/05/22.html#comments</comments>
		<pubDate>Mon, 05 Nov 2007 07:42:45 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[cache]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JbossCache]]></category>

		<guid isPermaLink="false">http://618119.com/archives/2007/11/05/22.html</guid>
		<description><![CDATA[JBossCache 2.0.0的使用及注意事项 1.首先是下载 JBossCache 2.0.0 GA. 下载地址为 ：http://jaist.dl.sourceforge.net/sourceforge/jboss/JBossCache-all-2.0.0.GA.zip 来源 ： http://sourceforge.net/project/showfiles.php?group_id=22866&#38;package_id=102339 (目前最新版为： JBossCache 2.1.0.CR1 http://jaist.dl.sourceforge.net/sourceforge/jboss/jbosscache-core-2.1.0.CR1-all.zip) 2.解压到 D:\Java\JBossCache-all-2.0.0.GA。 D:\Java\JBossCache-all-2.0.0.GA\lib下是JbossCache需要用到的lib。 D:\Java\JBossCache-all-2.0.0.GA\docs\JBossCache-UserGuide\en\pdf\JBossCache-UserGuide.pdf是用户手册。 3.创建 Cache可以通过配置文件和默认的Cache工厂 。 [code] XmlConfigurationParser parser = new XmlConfigurationParser(); Configuration conf = parser.parseFile("E://JbossCacheservice.xml"); Cache cache = DefaultCacheFactory.getInstance().createCache(conf, true); [/code] 不过我遇到过郁闷的问题： [code] XmlConfigurationParser parser = new XmlConfigurationParser(); Configuration conf = parser.parseFile("E://JbossCacheservice.xml"); DefaultCacheFactory dcf=DefaultCacheFactory.getInstance(); Cache cache = dcf.createCache(conf, [...]]]></description>
		<wfw:commentRss>http://618119.com/archives/2007/11/05/22.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jbossCache在Tomcat中部署时出现javax.naming.NamingException: Context is read only</title>
		<link>http://618119.com/archives/2007/11/02/20.html</link>
		<comments>http://618119.com/archives/2007/11/02/20.html#comments</comments>
		<pubDate>Fri, 02 Nov 2007 03:41:08 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[cache]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JbossCache]]></category>
		<category><![CDATA[Context]]></category>
		<category><![CDATA[JNDI]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[TransactionManager]]></category>

		<guid isPermaLink="false">http://618119.com/archives/2007/11/02/20.html</guid>
		<description><![CDATA[出错信息为： [code] 2007-11-02 11:33:41,471 ERROR [org.jboss.cache.transaction.DummyTransactionManager] - &#60;binding of DummyTransactionManager failed&#62; javax.naming.NamingException: Context is read only at org.apache.naming.NamingContext.checkWritable(NamingContext.java:903) at org.apache.naming.NamingContext.bind(NamingContext.java:831) at org.apache.naming.NamingContext.bind(NamingContext.java:171) at org.apache.naming.NamingContext.bind(NamingContext.java:187) at org.apache.naming.SelectorContext.bind(SelectorContext.java:171) at javax.naming.InitialContext.bind(InitialContext.java:359) at org.jboss.cache.transaction.DummyTransactionManager.getInstance(DummyTransactionManager.java:42) at org.jboss.cache.transaction.GenericTransactionManagerLookup .getTransactionManager (GenericTransactionManagerLookup.java:92) at org.jboss.cache.CacheImpl.createTransactionManager(CacheImpl.java:660) at org.jboss.cache.CacheImpl.internalStart(CacheImpl.java:726) at org.jboss.cache.CacheImpl.start(CacheImpl.java:708) at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:79) [/code] 这是因为我们通常是使用了JbossCache 自带的配置文件样本来进行配置的。 配置文件中默认是这样配置的： &#60;attribute name=&#8221;TransactionManagerLookupClass&#8221;&#62;org.jboss.cache.transaction.GenericTransactionManagerLookup &#60;/attribute&#62; 而通过查看 org.jboss.cache.transaction.DummyTransactionManager.java的代码可以发现， 在创建TransactionManager的时候执行了一个Context。bind绑定操作。 出错信息用 log.error写入日志里： 代码为：[code] [...]]]></description>
		<wfw:commentRss>http://618119.com/archives/2007/11/02/20.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

