<?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>真好吃 &#187; 未分类</title>
	<atom:link href="http://tgic.me/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://tgic.me</link>
	<description>blog真的很好吃</description>
	<lastBuildDate>Sun, 01 Jan 2012 17:31:20 +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>2012 第一个patch MySlot 宏图标丢失bug</title>
		<link>http://tgic.me/2012/01/02/2012-%e7%ac%ac%e4%b8%80%e4%b8%aapatch-myslot-%e5%ae%8f%e5%9b%be%e6%a0%87%e4%b8%a2%e5%a4%b1bug/</link>
		<comments>http://tgic.me/2012/01/02/2012-%e7%ac%ac%e4%b8%80%e4%b8%aapatch-myslot-%e5%ae%8f%e5%9b%be%e6%a0%87%e4%b8%a2%e5%a4%b1bug/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 17:31:20 +0000</pubDate>
		<dc:creator>T.G.</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[WoW]]></category>

		<guid isPermaLink="false">http://tgic.me/?p=949</guid>
		<description><![CDATA[修正 MySlot 宏图标丢失 请到 这里下载吧 http://bbs.cwowaddon.com/thread-8139-1-1.html 祝大家新年快乐]]></description>
			<content:encoded><![CDATA[<p>修正 MySlot 宏图标丢失</p>
<p>请到 这里下载吧</p>
<p>http://bbs.cwowaddon.com/thread-8139-1-1.html</p>
<p>祝大家新年快乐</p>
]]></content:encoded>
			<wfw:commentRss>http://tgic.me/2012/01/02/2012-%e7%ac%ac%e4%b8%80%e4%b8%aapatch-myslot-%e5%ae%8f%e5%9b%be%e6%a0%87%e4%b8%a2%e5%a4%b1bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>需求分析的一个例子</title>
		<link>http://tgic.me/2011/12/30/%e9%9c%80%e6%b1%82%e5%88%86%e6%9e%90%e7%9a%84%e4%b8%80%e4%b8%aa%e4%be%8b%e5%ad%90/</link>
		<comments>http://tgic.me/2011/12/30/%e9%9c%80%e6%b1%82%e5%88%86%e6%9e%90%e7%9a%84%e4%b8%80%e4%b8%aa%e4%be%8b%e5%ad%90/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 16:29:27 +0000</pubDate>
		<dc:creator>T.G.</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://tgic.me/?p=947</guid>
		<description><![CDATA[好久没写blog了 明年的定位是传教士 刚一个同学问的插件书写问题 看了之后 其实是我们 经常被需求 误导 这个例子我觉得挺好帝 ********** 16:45:32 TG大叔在不在呀- - T.G. 23:32:53 臣在 ********** 23:33:21 -，- ********** 23:33:32 好迟呢 今天 T.G. 23:33:54 臣在 ********** 23:38:32 额 我想写个小插件 T.G. 23:39:04 恩 遇到什么吗发了啊 ********** 23:43:15 监视 现在CTM FS不是有个“旱霜”天赋么， ********** 23:43:23 我完全都还没开始写- - T.G. 23:44:30 完全没听过那个天赋啊…… ********** 23:48:31 - - ********** 23:48:32 等等哈。。 ********** 23:48:41 你现在难道还有在玩？ [...]]]></description>
			<content:encoded><![CDATA[<p>好久没写blog了<br />
明年的定位是传教士</p>
<p>刚一个同学问的插件书写问题<br />
看了之后 其实是我们 经常被需求 误导<br />
这个例子我觉得挺好帝</p>
<p>********** 16:45:32<br />
TG大叔在不在呀- -<br />
T.G. 23:32:53<br />
臣在<br />
********** 23:33:21<br />
-，-<br />
********** 23:33:32<br />
好迟呢 今天<br />
T.G. 23:33:54<br />
臣在<br />
********** 23:38:32<br />
额 我想写个小插件<br />
T.G. 23:39:04<br />
恩 遇到什么吗发了啊<br />
********** 23:43:15<br />
监视 现在CTM FS不是有个“旱霜”天赋么，<br />
********** 23:43:23<br />
我完全都还没开始写- -<br />
T.G. 23:44:30<br />
完全没听过那个天赋啊……<br />
********** 23:48:31<br />
- -<br />
********** 23:48:32<br />
等等哈。。<br />
********** 23:48:41<br />
你现在难道还有在玩？<br />
T.G. 23:48:55<br />
早就不完了<br />
********** 23:49:01<br />
噢~~<br />
********** 23:58:29 </p>
<p>T.G. 23:58:50<br />
好吧 然后呢<br />
********** 23:59:08<br />
就是这个 点寒冰箭之后就会消耗掉这个效果<br />
********** 23:59:14<br />
我想监视他<br />
********** 23:59:25<br />
在有这个的时候 能深结打一波<br />
T.G. 0:00:00<br />
不是很明白啊<br />
T.G. 0:00:09<br />
你要监视一个 buff么<br />
********** 0:00:21<br />
就是现在FS 很难有读条的机会 但是有这个之后冰剑只用1.4S 能有机会打一波<br />
********** 0:00:29<br />
就是因为这个连buff都不是<br />
********** 0:00:33<br />
所以我不知道怎么监视<br />
T.G. 0:00:54<br />
这个到底是个什么呢<br />
********** 0:05:48<br />
- -就是没15S 帮你减掉那冰剑施法时间- -<br />
********** 0:05:53<br />
每15s<br />
********** 0:05:55<br />
他没有CD<br />
********** 0:05:58<br />
相当于内置<br />
********** 0:06:00<br />
没有buff- -，<br />
********** 0:06:02<br />
说错了<br />
T.G. 0:06:14<br />
有什么特征么<br />
********** 0:06:18<br />
暴雪自带的法术效果提示 倒是能把寒冰箭图标高亮<br />
********** 0:06:20<br />
什么都没有<br />
T.G. 0:10:48<br />
 啊 你想在掂量的时候 做 点啥呢<br />
********** 0:11:49<br />
掂量？<br />
T.G. 0:12:20<br />
点亮<br />
********** 0:13:07<br />
就是在点亮的时候，能知道自己手里捏有这个”buff”<br />
可以在YY通知队友，然后强控，打出一波爆发<br />
T.G. 0:13:47<br />
啊 我说插件 做点什么<br />
********** 0:14:39<br />
就是能看到还有多少时间能有这个”buff”<br />
T.G. 0:15:02<br />
不是 随机触发的？<br />
********** 0:15:12<br />
不是<br />
********** 0:15:19<br />
每用掉之后15s有一个<br />
T.G. 0:15:58<br />
必有？<br />
********** 0:16:48<br />
对的<br />
T.G. 0:17:16<br />
那你的需求是<br />
buff掉后 出一个 15秒计时 对么<br />
********** 0:17:45<br />
- -对 差不多<br />
********** 0:17:57<br />
我用秒表的话 不太好用<br />
T.G. 0:17:58<br />
那你的工作是两部分<br />
T.G. 0:18:10<br />
一个是 抓住 buff掉<br />
********** 0:18:15<br />
对- -<br />
********** 0:18:18<br />
然后是计时。。</p>
]]></content:encoded>
			<wfw:commentRss>http://tgic.me/2011/12/30/%e9%9c%80%e6%b1%82%e5%88%86%e6%9e%90%e7%9a%84%e4%b8%80%e4%b8%aa%e4%be%8b%e5%ad%90/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>纪念下鲁迅先生</title>
		<link>http://tgic.me/2011/09/26/%e7%ba%aa%e5%bf%b5%e4%b8%8b%e9%b2%81%e8%bf%85%e5%85%88%e7%94%9f/</link>
		<comments>http://tgic.me/2011/09/26/%e7%ba%aa%e5%bf%b5%e4%b8%8b%e9%b2%81%e8%bf%85%e5%85%88%e7%94%9f/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 17:18:28 +0000</pubDate>
		<dc:creator>T.G.</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[粪青]]></category>

		<guid isPermaLink="false">http://tgic.me/?p=943</guid>
		<description><![CDATA[小时候 语文 老师 拿着大棒 让我们 背诵 课文 怕 鲁迅 先生 的 文章 多半是 病句 然后 课后题 就 无病呻吟 一样的 问我们 这句话 这么说 对么 有没有 道理 啊 什么的 鲁迅 是 名家 即便 我觉得 是病句 的话 那也不能说是 病句的 倘若说 他 老人家 的 不对 那你就要被 扣分 所以 我也跟着 摇头摆尾 地 背诵 那病态的 答案 我真想 答 因为 鲁迅是 名家 [...]]]></description>
			<content:encoded><![CDATA[<p>小时候 语文 老师 拿着大棒<br />
让我们 背诵 课文<br />
怕</p>
<p>鲁迅 先生 的 文章 多半是 病句<br />
然后 课后题 就 无病呻吟 一样的 问我们 这句话 这么说 对么<br />
有没有 道理 啊 什么的</p>
<p>鲁迅 是 名家 即便 我觉得 是病句 的话 那也不能说是 病句的<br />
倘若说 他 老人家 的 不对 那你就要被 扣分<br />
所以 我也跟着 摇头摆尾 地 背诵 那病态的 答案<br />
我真想 答 因为 鲁迅是 名家 所以他说的 都是对的</p>
<p>渐渐的 我长大了 再也不用学 语文了<br />
那万恶的 科目 大小 就托我的 后腿<br />
我那 扭曲的 字迹 就像 我被变态 的心理<br />
突然间 我发现 鲁迅先生 说的话 都不是 病句了<br />
他老人家 居然 在 我没出生的时候 就预料到 我 要 被变态了<br />
大家 就像他 讲述 的一样<br />
在胡同口 张着嘴 看剥羊皮<br />
在吃血馒头 治病<br />
在快乐的 安慰自己 我国比西方早 好久百年呢……</p>
<p>纪念和同情 鲁迅先生<br />
纪念您老早就告诉我 神奇的 一切<br />
而 被 是不是病句 和 有没有错误 误导 没有看清你说的话</p>
]]></content:encoded>
			<wfw:commentRss>http://tgic.me/2011/09/26/%e7%ba%aa%e5%bf%b5%e4%b8%8b%e9%b2%81%e8%bf%85%e5%85%88%e7%94%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Myslot 4.1 国服 bugfix3 修复CRC32错误</title>
		<link>http://tgic.me/2011/09/04/myslot-4-1-%e5%9b%bd%e6%9c%8d-bugfix3-%e4%bf%ae%e5%a4%8dcrc32%e9%94%99%e8%af%af/</link>
		<comments>http://tgic.me/2011/09/04/myslot-4-1-%e5%9b%bd%e6%9c%8d-bugfix3-%e4%bf%ae%e5%a4%8dcrc32%e9%94%99%e8%af%af/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 19:58:02 +0000</pubDate>
		<dc:creator>T.G.</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://tgic.me/?p=936</guid>
		<description><![CDATA[修正了一个宏特别长导出失败的BUG 这个 bug 非常感谢一位 玩家 提供帐号 帮忙排查 为了感谢 我送他一张 15元 点卡 以后 帮助我 发现 和 解决 疑难的 bug 我都会报答大家的 插件特有的按键绑定也可以被保存了 引入了压缩算法 字符更短 myslot.tar.bz2]]></description>
			<content:encoded><![CDATA[<p>修正了一个宏特别长导出失败的BUG</p>
<p>这个 bug 非常感谢一位 玩家 提供帐号 帮忙排查<br />
为了感谢 我送他一张 15元 点卡<br />
以后 帮助我 发现 和 解决 疑难的 bug 我都会报答大家的</p>
<p>插件特有的按键绑定也可以被保存了<br />
引入了压缩算法 字符更短</p>
<p><a href='http://tgic.me/wp-content/uploads/2011/09/myslot.tar.bz2'>myslot.tar.bz2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tgic.me/2011/09/04/myslot-4-1-%e5%9b%bd%e6%9c%8d-bugfix3-%e4%bf%ae%e5%a4%8dcrc32%e9%94%99%e8%af%af/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Myslot 4.1 国服 bugfix2 修复战斗按键变化</title>
		<link>http://tgic.me/2011/08/14/myslot-4-1-%e5%9b%bd%e6%9c%8d-bugfix2-%e4%bf%ae%e5%a4%8d%e6%88%98%e6%96%97%e6%8c%89%e9%94%ae%e5%8f%98%e5%8c%96/</link>
		<comments>http://tgic.me/2011/08/14/myslot-4-1-%e5%9b%bd%e6%9c%8d-bugfix2-%e4%bf%ae%e5%a4%8d%e6%88%98%e6%96%97%e6%8c%89%e9%94%ae%e5%8f%98%e5%8c%96/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 20:06:49 +0000</pubDate>
		<dc:creator>T.G.</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://tgic.me/?p=931</guid>
		<description><![CDATA[http://bbs.ngacn.cc/read.php?tid=4383844&#38;_fp=1 &#160; http://bbs.ngacn.cc/read.php?tid=4080259#l12 &#160; 根据 这两个 又 修正 一次 bug 将 困扰 大家很久的 战斗变化 和 角色专用导出时不好用的 bug修正了 myslot.tar.bz2 &#160; &#160;]]></description>
			<content:encoded><![CDATA[<p><a href="http://bbs.ngacn.cc/read.php?tid=4383844&amp;_fp=1">http://bbs.ngacn.cc/read.php?tid=4383844&amp;_fp=1</a></p>
<p>&nbsp;</p>
<p><a href="http://bbs.ngacn.cc/read.php?tid=4080259#l12">http://bbs.ngacn.cc/read.php?tid=4080259#l12</a></p>
<p>&nbsp;</p>
<p>根据 这两个 又 修正 一次 bug 将 困扰 大家很久的 战斗变化 和 角色专用导出时不好用的 bug修正了</p>
<h1><a href="http://tgic.me/wp-content/uploads/2011/08/myslot.tar.bz2">myslot.tar.bz2</a></h1>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://tgic.me/2011/08/14/myslot-4-1-%e5%9b%bd%e6%9c%8d-bugfix2-%e4%bf%ae%e5%a4%8d%e6%88%98%e6%96%97%e6%8c%89%e9%94%ae%e5%8f%98%e5%8c%96/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySlot 4.1 国服 Bugfix</title>
		<link>http://tgic.me/2011/08/13/myslot-4-1-%e5%9b%bd%e6%9c%8d-bugfix/</link>
		<comments>http://tgic.me/2011/08/13/myslot-4-1-%e5%9b%bd%e6%9c%8d-bugfix/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 04:55:20 +0000</pubDate>
		<dc:creator>T.G.</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://tgic.me/?p=927</guid>
		<description><![CDATA[&#160; 非常感谢 小M 全程 配合 调试 帮助解决了这个bug 这个bug 会导致 很多 人 按 导出 没有反映 修正了 另外 如果 发现bug 或者不能使用 请联系 QQ 22267156 或者 farmer1992@gmail.com 我一定会帮你解决的 myslot.tar.bz2]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<h2>非常感谢 小M 全程 配合 调试 帮助解决了这个bug</h2>
<p>这个bug 会导致 很多 人 按 导出 没有反映</p>
<p>修正了</p>
<p>另外 如果 发现bug 或者不能使用<br />
请联系 QQ 22267156 或者 farmer1992@gmail.com</p>
<p>我一定会帮你解决的</p>
<h1><a href="http://tgic.me/wp-content/uploads/2011/08/myslot.tar.bz2">myslot.tar.bz2</a></h1>
]]></content:encoded>
			<wfw:commentRss>http://tgic.me/2011/08/13/myslot-4-1-%e5%9b%bd%e6%9c%8d-bugfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>itemstatlite 的 继承人 wowtip.js</title>
		<link>http://tgic.me/2011/07/31/itemstatlite-%e7%9a%84-%e7%bb%a7%e6%89%bf%e4%ba%ba-wowtip-js/</link>
		<comments>http://tgic.me/2011/07/31/itemstatlite-%e7%9a%84-%e7%bb%a7%e6%89%bf%e4%ba%ba-wowtip-js/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 20:32:19 +0000</pubDate>
		<dc:creator>T.G.</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[ItemstatLite]]></category>

		<guid isPermaLink="false">http://tgic.me/?p=924</guid>
		<description><![CDATA[itemstatlite 是我第一个开放的作品 从 07年 维护到现在 很多人 帮助我 改才 得以发展 其间还 结识 byvoid 这个小朋友 想推荐到 公司 …… &#160; 那时候 跟 byvoid 说 itemstatlite 的计划 就是 迁移到 sae 做 云计算 时髦 说了 一年 多 终于 ctm 把armory 整个 结构都改变了 用户 反映说 不能用了  我这才 匆匆忙忙 开始 重写 &#160; 经过 一天的努力 终于复活了 item 部分 完成了 这次的 改动 主要 将计算 [...]]]></description>
			<content:encoded><![CDATA[<p>itemstatlite 是我第一个开放的作品 从 07年 维护到现在</p>
<p>很多人 帮助我 改才 得以发展</p>
<p>其间还 结识 byvoid 这个小朋友 想推荐到 公司 …… <img src='http://tgic.me/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p>那时候 跟 byvoid 说 itemstatlite 的计划 就是 迁移到 sae 做 云计算 时髦</p>
<p>说了 一年 多 终于 ctm 把armory 整个 结构都改变了</p>
<p>用户 反映说 不能用了  我这才 匆匆忙忙 开始 重写</p>
<p>&nbsp;</p>
<p>经过 一天的努力 终于复活了 item 部分 完成了</p>
<p>这次的 改动 主要 将计算 内容 全部托管给了 sae</p>
<p>用户 只需要 引入一个 js 文件 就可可以 使用了 ^_^</p>
<p>用户 只要 会编辑 模板就行了</p>
<p>&nbsp;</p>
<p>现在 就再 blog 上 实验一下[item]霜之哀伤[/item] 哈</p>
<p><a href="http://wowtip.sinaapp.com/">http://wowtip.sinaapp.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tgic.me/2011/07/31/itemstatlite-%e7%9a%84-%e7%bb%a7%e6%89%bf%e4%ba%ba-wowtip-js/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Myslot 4.1/4.2 FOR 国服 CTM</title>
		<link>http://tgic.me/2011/07/17/myslot-4-14-2-for-%e5%9b%bd%e6%9c%8d-ctm/</link>
		<comments>http://tgic.me/2011/07/17/myslot-4-14-2-for-%e5%9b%bd%e6%9c%8d-ctm/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 16:49:29 +0000</pubDate>
		<dc:creator>T.G.</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://tgic.me/?p=920</guid>
		<description><![CDATA[恭喜 国服 开 CTM 了 以前的 欧服 beta 终于下决心 更新了 把 宏导入 也做了 进去 改进了算法 导入 导出 速度 是 3代的 10倍 导出串大小 是原来的 1/10 &#160; 感谢 使用 下载最新的Myslot for CTM国服]]></description>
			<content:encoded><![CDATA[<p>恭喜 国服 开 CTM 了</p>
<p>以前的 欧服 beta 终于下决心 更新了 把 宏导入 也做了 进去</p>
<p>改进了算法 导入 导出 速度 是 3代的 10倍</p>
<p>导出串大小 是原来的 1/10</p>
<p>&nbsp;</p>
<p>感谢 使用</p>
<h1><a href="http://tgic.me/wp-content/uploads/2011/07/MySlot.tar.bz2">下载最新的Myslot for CTM国服</a></h1>
]]></content:encoded>
			<wfw:commentRss>http://tgic.me/2011/07/17/myslot-4-14-2-for-%e5%9b%bd%e6%9c%8d-ctm/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>屠龙的技能</title>
		<link>http://tgic.me/2011/06/05/%e5%b1%a0%e9%be%99%e7%9a%84%e6%8a%80%e8%83%bd/</link>
		<comments>http://tgic.me/2011/06/05/%e5%b1%a0%e9%be%99%e7%9a%84%e6%8a%80%e8%83%bd/#comments</comments>
		<pubDate>Sat, 04 Jun 2011 16:43:41 +0000</pubDate>
		<dc:creator>T.G.</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://tgic.me/?p=915</guid>
		<description><![CDATA[生产服务器 的 jvm 的 load 上周终于 高了…… 一台机器 表现 不正常 最幸福的 事情 就是 有屠龙的技能 也要找到 龙了 然后 就将学来 的 分析 jvm 寻找 load  高的技能 施展了一下 以前 用 木庄 练习 实在是没劲 实际再 生产机器 上 动手还是 有困难的 &#160; 笔记 thread dump 很多 文档 都说 kill -3 PID 其实 没啥不对 关键 当时比较 傻 将 std 打到 /dev/null 里边去了 [...]]]></description>
			<content:encoded><![CDATA[<p>生产服务器 的 jvm 的 load 上周终于 高了……<br />
一台机器 表现 不正常</p>
<p><strong><span style="color: #ff0000;">最幸福的 事情 就是 有屠龙的技能 也要找到 龙了</span></strong></p>
<p>然后 就将学来 的 分析 jvm 寻找 load  高的技能 施展了一下</p>
<p>以前 用 木庄 练习 实在是没劲</p>
<p>实际再 生产机器 上 动手还是 有困难的</p>
<p>&nbsp;</p>
<p><strong>笔记</strong></p>
<p>thread dump</p>
<p>很多 文档 都说 kill -3 PID</p>
<p>其实 没啥不对 关键 当时比较 傻 将 std 打到 /dev/null 里边去了</p>
<p>后来 发现 jstack (jdk自带) 比 kill -3 牛逼 多了</p>
<p>还能 force dump (pid 没响应了)</p>
<p>&nbsp;</p>
<p>拿到 thread dump 就是 top -H 了</p>
<p>第一次 弄 忘记了 -H 呵呵 不过 发现进程 少了 很快就发现了</p>
<p>&nbsp;</p>
<p>拿到 nid 转 16进制 然后 马上 就发现 bug 所在了</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>比老师 Bluedavy  在书中 就是 感谢 有关部门 提供 机会</p>
<p>实践想法 才得到 成长的</p>
<p>我 这里也感谢 有关部门 提供 支持</p>
<p>顺便 感谢 前几次 故障 内存漏了 句柄漏了 ……</p>
<p>机会留给有准备的 淫</p>
]]></content:encoded>
			<wfw:commentRss>http://tgic.me/2011/06/05/%e5%b1%a0%e9%be%99%e7%9a%84%e6%8a%80%e8%83%bd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JBoss 远程 Jndi 链接 数据源 ibatis 出异常的解决</title>
		<link>http://tgic.me/2011/05/15/jboss-%e8%bf%9c%e7%a8%8b-jndi-%e9%93%be%e6%8e%a5-%e6%95%b0%e6%8d%ae%e6%ba%90-ibatis-%e5%87%ba%e5%bc%82%e5%b8%b8%e7%9a%84%e8%a7%a3%e5%86%b3/</link>
		<comments>http://tgic.me/2011/05/15/jboss-%e8%bf%9c%e7%a8%8b-jndi-%e9%93%be%e6%8e%a5-%e6%95%b0%e6%8d%ae%e6%ba%90-ibatis-%e5%87%ba%e5%bc%82%e5%b8%b8%e7%9a%84%e8%a7%a3%e5%86%b3/#comments</comments>
		<pubDate>Sat, 14 May 2011 17:01:33 +0000</pubDate>
		<dc:creator>T.G.</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://tgic.me/?p=904</guid>
		<description><![CDATA[JBoss 数据源默认 JNDI 默认 是不能 跨VM 提供的 需要加一句&#60;use-java-context&#62;false&#60;/use-java-context&#62; &#160; 这样 创建的数据源 没啥问题 也可以用 但是 ibatis 使用就有问题 java.sql.SQLException does not return Serializable &#160; 这个 问题 我找到了 同样的描述就是 http://stackoverflow.com/questions/39053/accessing-datasource-from-outside-a-web-container-through-jndi &#160; 我没找到正确的解决方案 就用 jdk 的 Proxy 给 它打了 一个 补丁…… 然后 就艺了 &#160; 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687/** &#160;* @author jiaoyi 通过 JNDI 远程链接 JBoss 的数据源 会有问题 抛出 &#160;* &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>JBoss 数据源默认 JNDI 默认 是不能 跨VM 提供的</p>
<p>需要加一句&lt;use-java-context&gt;false&lt;/use-java-context&gt;</p>
<p>&nbsp;</p>
<p>这样 创建的数据源 没啥问题 也可以用 但是 ibatis 使用就有问题</p>
<p>java.sql.SQLException does not return Serializable</p>
<p>&nbsp;</p>
<p>这个 问题 我找到了 同样的描述就是</p>
<p><a href="http://stackoverflow.com/questions/39053/accessing-datasource-from-outside-a-web-container-through-jndi">http://stackoverflow.com/questions/39053/accessing-datasource-from-outside-a-web-container-through-jndi</a></p>
<p>&nbsp;</p>
<p>我没找到正确的解决方案 就用 jdk 的 Proxy 给 它打了 一个 补丁…… 然后 就艺了</p>
<p>&nbsp;</p>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp;* @author jiaoyi 通过 JNDI 远程链接 JBoss 的数据源 会有问题 抛出<br />
&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; java.lang.IllegalAccessException: Method=public abstract<br />
&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; java.sql.Connection java.sql.Statement.getConnection() throws<br />
&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; java.sql.SQLException does not return Serializable<br />
&nbsp;* <br />
&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; 这个 家伙 通过hook 代码 将 原始的 Connection 返回给上层 解决这个问题<br />
&nbsp;* <br />
&nbsp;*/</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> JndiDataSourceProxy <span style="color: #000000; font-weight: bold;">implements</span> FactoryBean <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aclassloader+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">ClassLoader</span></a> THIS_LOADER <span style="color: #339933;">=</span> JndiDataSourceProxy.<span style="color: #000000; font-weight: bold;">class</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span style="color: #006633;">getClassLoader</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> jndiObject<span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setJndiObject<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> jndiObject<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">jndiObject</span> <span style="color: #339933;">=</span> jndiObject<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">class</span> StatementHandler <span style="color: #000000; font-weight: bold;">implements</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ainvocationhandler+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">InvocationHandler</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> DataSource ds <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>DataSource<span style="color: #009900;">&#41;</span> jndiObject<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> target<span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; StatementHandler<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> target<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">target</span> <span style="color: #339933;">=</span> target<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> invoke<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> proxy, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amethod+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Method</span></a> method, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Athrowable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Throwable</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;getConnection&quot;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span>method.<span style="color: #006633;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> ds.<span style="color: #006633;">getConnection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> method.<span style="color: #006633;">invoke</span><span style="color: #009900;">&#40;</span>target, args<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">class</span> ConnectionHandler <span style="color: #000000; font-weight: bold;">implements</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ainvocationhandler+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">InvocationHandler</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aconnection+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Connection</span></a> target<span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; ConnectionHandler<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aconnection+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Connection</span></a> target<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">target</span> <span style="color: #339933;">=</span> target<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> invoke<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> proxy, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amethod+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Method</span></a> method, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Athrowable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Throwable</span></a> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;prepareStatement&quot;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span>method.<span style="color: #006633;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astatement+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Statement</span></a><span style="color: #009900;">&#41;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aproxy+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Proxy</span></a>.<span style="color: #006633;">newProxyInstance</span><span style="color: #009900;">&#40;</span>THIS_LOADER,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000000; font-weight: bold;">Class</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Apreparedstatement+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">PreparedStatement</span></a>.<span style="color: #000000; font-weight: bold;">class</span> <span style="color: #009900;">&#125;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> StatementHandler<span style="color: #009900;">&#40;</span>method.<span style="color: #006633;">invoke</span><span style="color: #009900;">&#40;</span>target, args<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> method.<span style="color: #006633;">invoke</span><span style="color: #009900;">&#40;</span>target, args<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">class</span> DataSourceHandler <span style="color: #000000; font-weight: bold;">implements</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ainvocationhandler+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">InvocationHandler</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> DataSource ds <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>DataSource<span style="color: #009900;">&#41;</span> jndiObject<span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> invoke<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> proxy, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amethod+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Method</span></a> method, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Athrowable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Throwable</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;getConnection&quot;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span>method.<span style="color: #006633;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aconnection+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Connection</span></a><span style="color: #009900;">&#41;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aproxy+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Proxy</span></a>.<span style="color: #006633;">newProxyInstance</span><span style="color: #009900;">&#40;</span>THIS_LOADER,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000000; font-weight: bold;">Class</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aconnection+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Connection</span></a>.<span style="color: #000000; font-weight: bold;">class</span> <span style="color: #009900;">&#125;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> ConnectionHandler<span style="color: #009900;">&#40;</span>ds.<span style="color: #006633;">getConnection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> method.<span style="color: #006633;">invoke</span><span style="color: #009900;">&#40;</span>JndiDataSourceProxy.<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">jndiObject</span>, args<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Object</span></a> getObject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>DataSource<span style="color: #009900;">&#41;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aproxy+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Proxy</span></a>.<span style="color: #006633;">newProxyInstance</span><span style="color: #009900;">&#40;</span>THIS_LOADER,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000000; font-weight: bold;">Class</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span> DataSource.<span style="color: #000000; font-weight: bold;">class</span> <span style="color: #009900;">&#125;</span>, <span style="color: #000000; font-weight: bold;">new</span> DataSourceHandler<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Class<span style="color: #339933;">&lt;</span>DataSource<span style="color: #339933;">&gt;</span> getObjectType<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> DataSource.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> isSingleton<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>使用时候用这个 包上就行了</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;oracleDataSource&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;com.taobao.btc.mario.jndi.JndiDataSourceProxy&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;jndiObject&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.springframework.jndi.JndiObjectFactoryBean&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;jndiName&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;java:YourDS&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;jndiEnvironment&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;props<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;prop</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;java.naming.factory.initial&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>org.jnp.interfaces.NamingContextFactory<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/prop<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;prop</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;java.naming.provider.url&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>jnp://127.0.0.1:1099<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/prop<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;prop</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;java.naming.factory.url.pkgs&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>org.jboss.namingrg.jnp.interfaces<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/prop<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;prop</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;jnp.disableDiscovery&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/prop<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/props<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://tgic.me/2011/05/15/jboss-%e8%bf%9c%e7%a8%8b-jndi-%e9%93%be%e6%8e%a5-%e6%95%b0%e6%8d%ae%e6%ba%90-ibatis-%e5%87%ba%e5%bc%82%e5%b8%b8%e7%9a%84%e8%a7%a3%e5%86%b3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

