免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1710 | 回复: 1
打印 上一主题 下一主题

resin 连接池 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-24 12:43 |只看该作者 |倒序浏览
有人用resin吗? 关于连接池有没有能讲解下哦!

论坛徽章:
0
2 [报告]
发表于 2008-07-25 11:23 |只看该作者

回复 #1 quanta_top 的帖子

把相关的jdbc拷贝到resin_home/lib下,在到resin_home/onf下找resin.conf 在里面找<database>
<jndi-name>jdbc/test</jndi-name>
<driver type="com.microsoft.jdbc.sqlserver.SQLServerDriver">
<url>jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=Northwind</url>
<user>sa</user>
<password>sa</password>
</driver>
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>20</max-connections>
<max-idle-time>30s</max-idle-time>
</database>
在到web.xml中配置数据源
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
DataSource ds = (DataSource) envCtx.lookup("jdbc/test");

我这样做失败了,希望对你有点帮助
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP