帮忙看一下数据库连接池(不好意思就10分了 -_-||| )
我刚学没多长时间,按照网上的方法我配置了一个数据连接池。但是不知道对不对。
下面是源程序:
(测试程序我放在默认的ROOT文件夹里)
D:\jakarta-tomcat-5.0.28\conf、server.xml <host> </host>
<Logger className= "org.apache.catalina.logger.FileLogger "
directory= "logs " prefix= "localhost_log. " suffix= ".txt "
timestamp= "true "/>
<Context path= " " docBase= "ROOT "
debug= "5 " reloadable= "true " crossContext= "true ">
<Logger className= "org.apache.catalina.logger.FileLogger "
directory= "logs " prefix= "localhost_log. " suffix= ".txt "
timestamp= "true "/>
<Resource name= "jdbc/connectDB "
auth= "Container "
type= "javax.sql.DataSource "/>
<ResourceParams name= "jdbc/connectDB ">
<parameter>
<name> factory </name>
<value> org.apache.commons.dbcp.BasicDataSourceFactory </value>
</parameter>
<parameter>
<name> removeAbandoned </name>
<value> true </value>
</parameter>
<parameter>
<name> removeAbandonedTimeout </name>
<value> 60 </value>
</parameter>
<parameter>
<name> logAbandoned </name>
<value> false </value>
</parameter>