奇葛格的BLOG

红尘最可笑,我自乐逍遥

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  59 随笔 :: 23 文章 :: 11 评论 :: 0 Trackbacks

[http://proxool.sourceforge.net/howitworks.html]
Proxool acts as a proxy. That is, when you ask it to do something it delegates that task to another JDBC driver (you can use whatever driver you like). This has an important benefit: you can switch from any JDBC driver to Proxool by simply making a few configuration changes. The standard life cycle of asking the DriverManager for a Connection and then closing that Connection when you have finished with it remains unchanged.

Class.forName("org.logicalcobwebs.proxool.ProxoolDriver");
connection = DriverManager.getConnection(url);
...
connection.close();

When the ProxoolDriver gives you a Connection it actually gives you a ProxyConnection instead. The ProxyConnection does everything that a Connection does except that when you call the close() method it doesn't really close. Instead, it puts itself back into the pool.

posted on 2006-08-24 15:06 奇葛格 阅读(212) 评论(0)  编辑  收藏 所属分类: 技术新闻.乱评

只有注册用户登录后才能发表评论。


网站导航: