亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mysqlpooledconnection.java

?? jsp數(shù)據(jù)庫系統(tǒng)
?? JAVA
字號:
/*
   Copyright (C) 2002 MySQL AB
   
      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
      the Free Software Foundation; either version 2 of the License, or
      (at your option) any later version.
   
      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.
   
      You should have received a copy of the GNU General Public License
      along with this program; if not, write to the Free Software
      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
      
 */
package com.mysql.jdbc.jdbc2.optional;

import java.sql.Connection;
import java.sql.SQLException;

import java.util.Enumeration;
import java.util.Hashtable;

import javax.sql.ConnectionEvent;
import javax.sql.ConnectionEventListener;
import javax.sql.PooledConnection;


/**
 * This class is used to wrap and return a physical connection within a logical handle.
 * It also registers and notifies ConnectionEventListeners of any ConnectionEvents
 *
 * @see javax.sql.PooledConnection
 * @see org.gjt.mm.mysql.jdbc2.optional.LogicalHandle
 * @author Todd Wolff <todd.wolff_at_prodigy.net>
 */
public class MysqlPooledConnection
    implements PooledConnection {
	
	/**
	 * The flag for an exception being thrown.
	 */
	public static final int CONNECTION_ERROR_EVENT = 1;
	
	/**
	 * The flag for a connection being closed.
	 */
	public static final int CONNECTION_CLOSED_EVENT = 2;
	
    //~ Instance/static variables .............................................

    private Hashtable eventListeners;
    private Connection logicalHandle;
    private Connection physicalConn;
    

    //~ Constructors ..........................................................

    /**
    * Construct a new MysqlPooledConnection and set instance variables
    *
    * @param connection physical connection to db
    */
    public MysqlPooledConnection(Connection connection) {
        logicalHandle = null;
        physicalConn = connection;
        eventListeners = new Hashtable(10);
    }

    //~ Methods ...............................................................

    /**
     * Adds ConnectionEventListeners to a hash table to be used for notification of
     * ConnectionEvents
     *
     * @param connectioneventlistener listener to be notified with ConnectionEvents
     */
    public synchronized void addConnectionEventListener(ConnectionEventListener connectioneventlistener) {

        if (eventListeners != null) {
            eventListeners.put(connectioneventlistener, 
                               connectioneventlistener);
        }
    }

    /**
     * Removes ConnectionEventListeners from hash table used for notification of
     * ConnectionEvents
     *
     * @param connectioneventlistener listener to be removed
     */
    public synchronized void removeConnectionEventListener(ConnectionEventListener connectioneventlistener) {

        if (eventListeners != null) {
            eventListeners.remove(connectioneventlistener);
        }
    }

    /**
     * Invoked by the container.  Return a logicalHandle object that wraps a physical 
     * connection.
     *
     * @see java.sql.DataSource#getConnection()
     */
    public synchronized Connection getConnection()
                                          throws SQLException {

        if (physicalConn == null) {

            SQLException sqlException = new SQLException(
                                                "Physical Connection doesn't exist");
            callListener(CONNECTION_ERROR_EVENT, sqlException);

            return null;
        }

        try {

            if (logicalHandle != null) {
                ((ConnectionWrapper)logicalHandle).close(false);
            }

            logicalHandle = new ConnectionWrapper(this, physicalConn);
        } catch (SQLException sqlException) {
            callListener(CONNECTION_ERROR_EVENT, sqlException);

            return null;
        }

        return logicalHandle;
    }

    /**
     * Invoked by the container (not the client), and should close the physical connection.
     * This will be called if the pool is destroyed or the connectionEventListener receives
     * a connectionErrorOccurred event.
     *
     * @see java.sql.DataSource#close()
     */
    public synchronized void close()
                            throws SQLException {
        physicalConn.close();
        physicalConn = null;
    }

    /**
     * Notifies all registered ConnectionEventListeners of ConnectionEvents.  Instantiates
     * a new ConnectionEvent which wraps sqlException and invokes either connectionClose
     * or connectionErrorOccurred on listener as appropriate.
     * 
     * @param eventType value indicating whether connectionClosed or connectionErrorOccurred called
     * @param sqlException the exception being thrown
     */
    protected synchronized void callListener(int eventType, SQLException sqlException) {

        if (eventListeners == null) {

            return;
        }

        Enumeration enumeration = eventListeners.keys();
        ConnectionEvent connectionevent = new ConnectionEvent(this, 
                                                              sqlException);

        while (enumeration.hasMoreElements()) {

            ConnectionEventListener connectioneventlistener = 
                    (ConnectionEventListener) enumeration.nextElement();
            ConnectionEventListener connectioneventlistener1 = 
                    (ConnectionEventListener) eventListeners.get(
                            connectioneventlistener);

            if (eventType == CONNECTION_CLOSED_EVENT) {
                connectioneventlistener1.connectionClosed(connectionevent);
            } else if (eventType == CONNECTION_ERROR_EVENT) {
                connectioneventlistener1.connectionErrorOccurred(
                        connectionevent);
            }
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人在线视频免费播放| 蜜臀91精品一区二区三区| 日韩你懂的在线播放| 欧美男生操女生| 欧洲在线/亚洲| 欧美性猛交一区二区三区精品| a级精品国产片在线观看| 国产成人精品影视| 成人性视频免费网站| 成人性生交大片免费看中文| 成人福利视频网站| 成a人片国产精品| 成人黄页在线观看| 99麻豆久久久国产精品免费| 成人h动漫精品一区二区| 成人h动漫精品一区二区| 色婷婷综合五月| 91国产精品成人| 欧美日韩精品久久久| 欧美一区二区三区四区五区| 精品三级在线观看| 中文字幕第一页久久| 成人免费在线播放视频| 一区二区日韩av| 日日嗨av一区二区三区四区| 六月丁香综合在线视频| 国产美女精品人人做人人爽| av在线不卡电影| 欧美在线三级电影| 精品国产免费一区二区三区四区 | 欧美日韩精品久久久| 欧美日韩在线一区二区| 91精品在线免费| 久久久久久久久免费| 亚洲美女在线国产| 日本不卡的三区四区五区| 国产电影一区二区三区| 色噜噜狠狠成人网p站| 91精品国产欧美日韩| 国产清纯白嫩初高生在线观看91| 亚洲精品美国一| 狠狠色丁香久久婷婷综合_中 | 成人综合在线视频| 在线免费精品视频| 国产人久久人人人人爽| 亚洲va在线va天堂| 成人精品免费网站| 91精品国产黑色紧身裤美女| 国产欧美日韩另类一区| 手机精品视频在线观看| 99免费精品视频| 欧美岛国在线观看| 五月婷婷另类国产| 成人app软件下载大全免费| 欧美sm极限捆绑bd| 亚洲一区二区三区国产| 丁香一区二区三区| 精品国偷自产国产一区| 亚洲国产一区在线观看| 国产精品自产自拍| 日韩一区二区免费高清| 一区二区三区四区av| 国产精品伊人色| 日韩小视频在线观看专区| 亚洲黄色尤物视频| www.av精品| 亚洲国产精品黑人久久久| 激情图区综合网| 欧美精品乱码久久久久久| 一区二区国产视频| 99久久夜色精品国产网站| 久久这里只有精品首页| 久久精品国产精品亚洲精品| 欧美精品v日韩精品v韩国精品v| 亚洲免费观看高清完整版在线观看熊| 国产成人精品亚洲日本在线桃色| 日韩精品一区二区在线观看| 免费成人av在线| 欧美蜜桃一区二区三区| 午夜精品免费在线观看| 欧美在线不卡一区| 亚洲一区电影777| 欧美在线不卡视频| 日韩精品五月天| 这里是久久伊人| 精品一区二区在线视频| 日韩欧美一级二级三级| 麻豆精品精品国产自在97香蕉| 欧美一区二区精品在线| 久久国产乱子精品免费女| 日韩午夜中文字幕| 国产一区在线精品| 久久精品亚洲麻豆av一区二区 | 亚洲综合久久久久| 欧美亚洲一区二区在线观看| 依依成人精品视频| 在线一区二区三区四区五区| 图片区小说区国产精品视频| 欧美群妇大交群中文字幕| 精品一区二区在线观看| 欧美国产丝袜视频| 欧美中文字幕一区| 日韩影院精彩在线| 精品理论电影在线| 成人美女在线观看| 亚洲国产日韩a在线播放| 欧美精品一卡两卡| 国产精品系列在线播放| 成人欧美一区二区三区白人| 777xxx欧美| 国产主播一区二区三区| 亚洲精品乱码久久久久久久久| 欧美精品日韩一区| heyzo一本久久综合| 亚洲精品中文字幕在线观看| 欧美日韩高清一区二区不卡| 国产麻豆精品久久一二三| 亚洲欧美激情视频在线观看一区二区三区| 在线观看成人免费视频| 国产老肥熟一区二区三区| 国产精品国产三级国产普通话蜜臀 | 欧美成人bangbros| 91免费精品国自产拍在线不卡| 偷窥国产亚洲免费视频| 国产精品欧美经典| 91精品免费在线| 色素色在线综合| 狠狠久久亚洲欧美| 日韩高清在线一区| 亚洲色图丝袜美腿| 欧美激情艳妇裸体舞| 91麻豆精品国产无毒不卡在线观看| 国产成人亚洲精品狼色在线| 天堂成人免费av电影一区| 国产精品麻豆久久久| 日韩精品一区二区三区视频| 欧美日韩免费在线视频| 成人h精品动漫一区二区三区| 蜜臀av性久久久久蜜臀aⅴ流畅| 《视频一区视频二区| 久久精品亚洲精品国产欧美kt∨ | 另类小说视频一区二区| 伊人一区二区三区| 亚洲色欲色欲www| 国产精品网站在线播放| 久久久不卡网国产精品一区| 91精品国产色综合久久不卡电影| 欧美丝袜丝nylons| 色综合久久99| av在线不卡免费看| av不卡免费电影| 成人福利电影精品一区二区在线观看 | 欧美精彩视频一区二区三区| 日韩一级黄色大片| 7777精品伊人久久久大香线蕉的| 欧洲av在线精品| 色久优优欧美色久优优| av亚洲精华国产精华| 风流少妇一区二区| 国产成人在线视频免费播放| 国产在线一区二区综合免费视频| 麻豆91免费看| 另类中文字幕网| 国产精品中文欧美| 国产成人精品免费| 成人av小说网| 91免费视频大全| 91成人在线精品| 91麻豆精品国产91| 日韩视频永久免费| 国产视频一区二区在线| 国产亚洲精品aa午夜观看| 日本一区二区三区视频视频| 国产视频亚洲色图| 亚洲三级电影网站| 亚洲成人1区2区| 老司机午夜精品| 成人国产亚洲欧美成人综合网| 国产成人综合在线观看| 91麻豆123| 欧美精品久久一区二区三区| 欧美va天堂va视频va在线| 国产精品无码永久免费888| 亚洲美女淫视频| 免费亚洲电影在线| 不卡大黄网站免费看| 日本韩国欧美国产| 欧美成人猛片aaaaaaa| 中文字幕va一区二区三区| 亚洲国产精品天堂| 国产99一区视频免费| 在线亚洲免费视频| 精品国产免费视频| 亚洲风情在线资源站| 国产麻豆日韩欧美久久| 欧美性色欧美a在线播放| 久久综合999| 日韩综合在线视频| 91污片在线观看| 欧美成人精精品一区二区频|