运用ThreadLocal解决jdbc事务管理
摘要:
JdbcUtils.javapublic class JdbcUtils { private static ThreadLocal<Connection> tl = new ThreadLocal<Connection>(); private static DataSource ds; static { ds = new ComboPooledDataSource(); } public static DataSource getDataSource() { return ds; } // 当前线程绑... 阅读全文
posted @ 2012-10-18 10:23 Knuth_档案 阅读(1101) 评论(0) 推荐(0) 编辑