很多人刚开始接触数据库都是对它进行封装调用,可这样会师系统浪费很大的资源,所以很多方案为了解决这个问题就利用上了数据池的技术
我现在讲自己的服务器配置上传一份供大家参考吧.- <Context>
- <!-- Default set of monitored resources -->
- <WatchedResource>WEB-INF/web.xml</WatchedResource>
- <!-- Uncomment this to disable session persistence across Tomcat restarts -->
- <!--
- <Manager pathname="" />
- -->
- <Resource name ="jdbc/enews"
- username="think1"
- password="a1234"
- driverClassName="oracle.jdbc.driver.OracleDriver"
- url="jdbc:oracle:thin:@localhost:1521:orcl"
- auth="Container"
- type="javax.sql.DataSource"
- maxActive="20"
- maxIdle="10"
- maxWait="10000"
- />
- <!-- Uncomment this to enable Comet connection tacking (provides events
- on session expiration as well as webapp lifecycle) -->
- <!--
- <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
- -->
- </Context>
复制代码 |