摘要:
DBCP数据源:需要•Commons-dbcp.jar:连接池的实现•Commons-pool.jar:连接池实现的依赖库dbcpconfig.properties(这个在src同目录下--模板)#连接设置driverClassName=com.mysql.jdbc.Driverurl=jdbc:m... 阅读全文
摘要:
编写连接池需实现java.sql.DataSource接口。DataSource接口中定义了两个重载的getConnection方法: •Connection getConnection() •Connection getConnection(Stringusername, Stringpass... 阅读全文
摘要:
演示不同隔离级别下的并发问题1.当把事务的隔离级别设置为read uncommitted时,会引发脏读、不可重复读和虚读A窗口set transaction isolation level read uncommitted;start transaction;select * from accou... 阅读全文