教程集 www.jiaochengji.com
教程集 >  脚本编程  >  java  >  正文 一个连接池的例子(来自JIVE)(2)

一个连接池的例子(来自JIVE)(2)

发布时间:2019-10-08   编辑:jiaochengji.com
教程集为您提供一个连接池的例子(来自JIVE)(2)等资源,欢迎您收藏本站,我们将为您提供最新的一个连接池的例子(来自JIVE)(2)资源
//文件:DbConnectionDefaultPool.java的第二部分
        /**
         * Housekeeping thread.  Runs in the background with low CPU overhead.
         * Connections are checked for warnings and closure and are periodically
         * restarted.
         * This thread is a catchall for corrupted
         * connections and prevents the buildup of open cursors. (Open cursors
         * result when the application fails to close a Statement).
         * This method acts as fault tolerance for bad connection/statement programming.
         */
        public void run() {
            boolean forever = true;
            Statement stmt=null;
            String currCatalog=null;
            while(forever) {
                // Make sure the log file is the one this instance opened
                // If not, clean it up!
                try {
                    BufferedReader in = new BufferedReader(new

您可能感兴趣的文章:
一个连接池的例子(来自JIVE)(6)
一个连接池的例子(来自JIVE)(1)
一个连接池的例子(说明)
一个连接池的例子(来自JIVE)(2)
一个连接池的例子(来自JIVE)(5)
一个连接池的例子(来自JIVE)(3)
一个连接池的例子(来自JIVE)(4)
用连接池提高Servlet访问数据库的效率
使用JAVA中的动态代理实现数据库连接池
一种实现数据库连接池的方法(2)

[关闭]
~ ~