mysql 连接池
来源:互联网 发布:nxpowerlite mac 破解 编辑:程序博客网 时间:2024/05/20 23:39
在Tomcat ---->conf----->context.xml 文件中的<Context></Context>中
写上 <WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30"
maxWait="10000" username="root" password="root" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/information?autoReconnect=true" />
则在相应的测试文件中 写上:
try {
Context context= new InitialContext(); //在Tomcat 中配置连接池
DataSource ds= (DataSource) context.lookup("java:/comp/env/jdbc/mysql");
conn=ds.getConnection();
- 连接池连接mysql
- mysql连接池连接JSP
- mysql连接池连接JSP
- mysql连接池连接JSP
- 连接池连接Mysql数据库
- Python连接Mysql 连接池
- 使用mysql连接池
- mysql连接池问题
- JDBC+MySQL连接池
- mysql 连接池
- MySQL连接池
- mysql 连接池
- mysql 连接池
- mysql连接池问题
- mysql连接池
- DDconnectionBroker连接池(MySQL)
- mysql连接池问题
- mysql连接池
- 喜出往外--解决了,为什么QTP自带飞机案例的网页打开以后不能使用
- curl pycurl
- 开源中国-android软件资源整理
- 正则表达式30分钟入门教程
- jstl的函数库
- mysql 连接池
- mysql判断数据库是否存在
- DES algorithm
- 风
- 关于C++中Singleton类实例析构的讨论[zz]
- USB OTG驱动分析
- 深入Android 【五】 —— 任务和进程
- 多线程使用pycurl时出现段错误(segmentation fault)
- C#中IL反汇编工具的使用 其具体含义如下文