日期:2014-05-18  浏览次数:20772 次

Tomcat5.5数据库连接池的配置过程??
有谁在Tomcat5.5下成功配置过连接池?能把配置过程共享一下吗?谢谢
我的环境是Tomcat5.5.20

------解决方案--------------------
网上的有好N多。
------解决方案--------------------
配置好好,可以做个测试页面,测试下就行!
------解决方案--------------------
5.5应该很好配置,驱动放好,很容易成功
http://tb.blog.csdn.net/TrackBack.aspx?PostId=1472601
------解决方案--------------------
conf/server.xml中加上
<Resource
name= "jdbc/kmdb "
type= "javax.sql.DataSource "
password= "密码 "
driverClassName= "com.microsoft.jdbc.sqlserver.SQLServerDriver "
maxIdle= "20 "
maxWait= "5000 "
username= "sa "
url= "jdbc:microsoft:sqlserver://ip或数据库名称:1433;SelectMethod=Cursor;databasename=** "
removeAbandoned= "true "
removeAbandonedTimeout= "10 "
logAbandoned= "true "
maxActive= "100 "/>
</GlobalNamingResources>
------解决方案--------------------
要copy相应的驱动到/Tomcat/Commons/Lib/目录下;
------解决方案--------------------
也可以在context.xml

<Context reloadable= "true ">
<Logger className= "org.apache.catalina.logger.FileLogger "
prefix= "web_log. " suffix= ".txt " timestamp= "true "/>
<Resource name= "jdbc/xxx "
type= "javax.sql.DataSource "
driverClassName= "com.mysql.jdbc.Driver "
maxIdle= "50 "
maxWait= "5000 "
username= "root "
password= "123456 "
url= "jdbc:mysql://localhost:3306/xxx?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf-8 "
maxActive= "20 "
removeAbandoned= "true "
removeAbandonedTimeout= "60 "
logAbandoned= "true "/>
</Context>