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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? c3p0pooledconnection.java

?? c3p0數(shù)據(jù)庫(kù)連接池實(shí)現(xiàn)源碼
?? JAVA
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* * Distributed as part of c3p0 v.0.9.1-pre6 * * Copyright (C) 2005 Machinery For Change, Inc. * * Author: Steve Waldman <swaldman@mchange.com> * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 2.1, as  * published by the Free Software Foundation. * * This software 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software; see the file LICENSE.  If not, write to the * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. */package com.mchange.v2.c3p0.impl;import java.lang.reflect.*;import java.sql.*;import java.util.*;import javax.sql.*;import com.mchange.v2.log.*;import com.mchange.v2.sql.*;import com.mchange.v2.sql.filter.*;import com.mchange.v2.c3p0.*;import com.mchange.v2.c3p0.stmt.*;import com.mchange.v1.util.ClosableResource;import com.mchange.v2.c3p0.C3P0ProxyConnection;import com.mchange.v2.c3p0.util.ConnectionEventSupport;import com.mchange.v2.lang.ObjectUtils;public final class C3P0PooledConnection implements PooledConnection, ClosableResource{    final static MLogger logger = MLog.getLogger( C3P0PooledConnection.class );    final static ClassLoader CL = C3P0PooledConnection.class.getClassLoader();    final static Class[]     PROXY_CTOR_ARGS = new Class[]{ InvocationHandler.class };    final static Constructor CON_PROXY_CTOR;    final static Method RS_CLOSE_METHOD;    final static Method STMT_CLOSE_METHOD;    final static Object[] CLOSE_ARGS;    final static Set OBJECT_METHODS;    /**     * @deprecated use or rewrite in terms of ReflectUtils.findProxyConstructor()     */    private static Constructor createProxyConstructor(Class intfc) throws NoSuchMethodException    { 	Class[] proxyInterfaces = new Class[] { intfc };	Class proxyCl = Proxy.getProxyClass(CL, proxyInterfaces);	return proxyCl.getConstructor( PROXY_CTOR_ARGS );     }    static    {	try	    {		CON_PROXY_CTOR = createProxyConstructor( ProxyConnection.class );		Class[] argClasses = new Class[0];		RS_CLOSE_METHOD = ResultSet.class.getMethod("close", argClasses);		STMT_CLOSE_METHOD = Statement.class.getMethod("close", argClasses);		CLOSE_ARGS = new Object[0];		OBJECT_METHODS = Collections.unmodifiableSet( new HashSet( Arrays.asList( Object.class.getMethods() ) ) );	    }	catch (Exception e)	    { 		//e.printStackTrace();		logger.log(MLevel.SEVERE, "An Exception occurred in static initializer of" + C3P0PooledConnection.class.getName(), e);		throw new InternalError("Something is very wrong, or this is a pre 1.3 JVM." +					"We cannot set up dynamic proxies and/or methods!");	    }    }    //MT: post-constructor constants    final ConnectionTester connectionTester;    final boolean autoCommitOnClose;    final boolean forceIgnoreUnresolvedTransactions;    final boolean supports_setTypeMap;    final boolean supports_setHoldability;    final int dflt_txn_isolation;    final String dflt_catalog;    final int dflt_holdability;    //MT: thread-safe    final ConnectionEventSupport ces = new ConnectionEventSupport(this);    //MT: threadsafe, but reassigned (on close)    volatile Connection physicalConnection;    volatile Exception  invalidatingException = null;    //MT: threadsafe, but reassigned, and a read + reassignment must happen    //    atomically. protected by this' lock.    ProxyConnection exposedProxy;    //MT: protected by this' lock    int connection_status = ConnectionTester.CONNECTION_IS_OKAY;    /*     * contains all unclosed Statements not managed by a StatementCache     * associated with the physical connection     *     * MT: protected by its own lock, not reassigned     */    final Set uncachedActiveStatements = Collections.synchronizedSet( new HashSet() );    //MT: Thread-safe, assigned    volatile GooGooStatementCache scache;    volatile boolean isolation_lvl_nondefault = false;    volatile boolean catalog_nondefault       = false;     volatile boolean holdability_nondefault   = false;     public C3P0PooledConnection(Connection con, 				ConnectionTester connectionTester,				boolean autoCommitOnClose, 				boolean forceIgnoreUnresolvedTransactions) throws SQLException    { 	this.physicalConnection = con; 	this.connectionTester = connectionTester;	this.autoCommitOnClose = autoCommitOnClose;	this.forceIgnoreUnresolvedTransactions = forceIgnoreUnresolvedTransactions;	this.supports_setTypeMap = C3P0ImplUtils.supportsMethod(con, "setTypeMap", new Class[]{ Map.class });	this.supports_setHoldability = C3P0ImplUtils.supportsMethod(con, "setHoldability", new Class[]{ Integer.class });	this.dflt_txn_isolation = con.getTransactionIsolation();	this.dflt_catalog = con.getCatalog();	this.dflt_holdability = (supports_setHoldability ? con.getHoldability() : ResultSet.CLOSE_CURSORS_AT_COMMIT);    }    Connection getPhysicalConnection()    { return physicalConnection; }    boolean isClosed() throws SQLException    { return (physicalConnection == null); }    void initStatementCache( GooGooStatementCache scache )    { this.scache = scache; }    //DEBUG    //Exception origGet = null;    // synchronized to protect exposedProxy    public synchronized Connection getConnection()	throws SQLException    { 	if ( exposedProxy != null)	    {		//DEBUG		//System.err.println("[DOUBLE_GET_TESTER] -- double getting a Connection from " + this );		//new Exception("[DOUBLE_GET_TESTER] -- Double-Get Stack Trace").printStackTrace();		//origGet.printStackTrace();// 		System.err.println("c3p0 -- Uh oh... getConnection() was called on a PooledConnection when " +// 				   "it had already provided a client with a Connection that has not yet been " +// 				   "closed. This probably indicates a bug in the connection pool!!!");		logger.warning("c3p0 -- Uh oh... getConnection() was called on a PooledConnection when " +			       "it had already provided a client with a Connection that has not yet been " +			       "closed. This probably indicates a bug in the connection pool!!!");		return exposedProxy;	    }	else	    { return getCreateNewConnection(); }    }    // must be called from sync'ed method to protecte    // exposedProxy    private Connection getCreateNewConnection()	throws SQLException    {	try	    {		//DEBUG		//origGet = new Exception("[DOUBLE_GET_TESTER] -- Orig Get");				ensureOkay();		/*		 * we reset the physical connection when we close an exposed proxy		 * no need to do it again when we create one		 */		//reset();		return (exposedProxy = createProxyConnection()); 	    }	catch (SQLException e)	    { throw e; }	catch (Exception e)	    {		//e.printStackTrace();		logger.log(MLevel.WARNING, "Failed to acquire connection!", e);		throw new SQLException("Failed to acquire connection!");	    }    }    public void closeAll() throws SQLException    {	if (scache != null)	    scache.closeAll( physicalConnection );    }    public void close() throws SQLException    { this.close( false ); }    //TODO: factor out repetitive debugging code    private synchronized void close(boolean known_invalid) throws SQLException    {	//System.err.println("Closing " + this);	if ( physicalConnection != null )	    {		try		    { 			StringBuffer debugOnlyLog = null;			if ( Debug.DEBUG && known_invalid )			    {				debugOnlyLog = new StringBuffer();				debugOnlyLog.append("[ exceptions: ");			    }			Exception exc = cleanupUncachedActiveStatements();			if (Debug.DEBUG && exc != null) 			    {				if (known_invalid)				    debugOnlyLog.append( exc.toString() + ' ' );				else				    logger.log(MLevel.WARNING, "An exception occurred while cleaning up uncached active Statements.", exc);				    //exc.printStackTrace();			    }			try 			    { 				// we've got to use silentClose() rather than close() here,				// 'cuz if there's still an exposedProxy (say a user forgot to				// close his Connection) before we close, and we use regular (loud)				// close, we will try to check this dead or dying PooledConnection				// back into the pool. We only want to do this when close is called				// on user proxies, and the underlying PooledConnection might still				// be good. The PooledConnection itself should only be closed by the				// pool.				if (exposedProxy != null)				    exposedProxy.silentClose( known_invalid );			    }			catch (Exception e)			    {				if (Debug.DEBUG)				    {					if (known_invalid)					    debugOnlyLog.append( e.toString() + ' ' );					else					    logger.log(MLevel.WARNING, "An exception occurred.", exc);					    //e.printStackTrace();				    }				exc = e;			    }			try			    { this.closeAll(); }			catch (Exception e)			    {				if (Debug.DEBUG)				    {					if (known_invalid)					    debugOnlyLog.append( e.toString() + ' ' );					else					    logger.log(MLevel.WARNING, "An exception occurred.", exc);					    //e.printStackTrace();				    }				exc = e;			    }						try { physicalConnection.close(); }			catch (Exception e)			    {				if (Debug.DEBUG)				    {					if (known_invalid)					    debugOnlyLog.append( e.toString() + ' ' );					else					    logger.log(MLevel.WARNING, "An exception occurred.", exc);					    e.printStackTrace();				    }				exc = e;			    }			if (exc != null)			    {				if (known_invalid)				    {					debugOnlyLog.append(" ]");					if (Debug.DEBUG)					    {// 						System.err.print("[DEBUG]" + this + ": while closing a PooledConnection known to be invalid, ");// 						System.err.println("  some exceptions occurred. This is probably not a problem:");// 						System.err.println( debugOnlyLog.toString() );						logger.fine(this + ": while closing a PooledConnection known to be invalid, " +							    "  some exceptions occurred. This is probably not a problem: " +							    debugOnlyLog.toString() );					    }				    }				else				    throw new SQLException("At least one error occurred while attempting " +							   "to close() the PooledConnection: " + exc);			    }			if (Debug.TRACE == Debug.TRACE_MAX)			    logger.fine("C3P0PooledConnection closed. [" + this + ']');			    //System.err.println("C3P0PooledConnection closed. [" + this + ']');		    }		finally		    { physicalConnection = null; }	    }    }    public void addConnectionEventListener(ConnectionEventListener listener)    { ces.addConnectionEventListener( listener ); }    public void removeConnectionEventListener(ConnectionEventListener listener)    { ces.removeConnectionEventListener( listener ); }    private void reset() throws SQLException    { reset( false ); }    private void reset( boolean known_resolved_txn ) throws SQLException    {	ensureOkay();	C3P0ImplUtils.resetTxnState( physicalConnection, forceIgnoreUnresolvedTransactions, autoCommitOnClose, known_resolved_txn );	if (isolation_lvl_nondefault)	    {		physicalConnection.setTransactionIsolation( dflt_txn_isolation );		isolation_lvl_nondefault = false; 	    }	if (catalog_nondefault)	    {		physicalConnection.setCatalog( dflt_catalog );		catalog_nondefault = false; 	    }	if (holdability_nondefault) //we don't test if holdability is supported, 'cuz it can never go nondefault if it's not.	    {		physicalConnection.setHoldability( dflt_holdability );		holdability_nondefault = false; 	    }	try	    { physicalConnection.setReadOnly( false ); }	catch ( Throwable t )	    {		if (logger.isLoggable( MLevel.FINE ))		    logger.log(MLevel.FINE, "A Throwable occurred while trying to reset the readOnly property of our Connection to false!", t);	    }	try	    { if (supports_setTypeMap) physicalConnection.setTypeMap( Collections.EMPTY_MAP ); }	catch ( Throwable t )	    {		if (logger.isLoggable( MLevel.FINE ))		    logger.log(MLevel.FINE, "A Throwable occurred while trying to reset the typeMap property of our Connection to Collections.EMPTY_MAP!", t);	    }    }    boolean closeAndRemoveResultSets(Set rsSet)    {	boolean okay = true;	synchronized (rsSet)	    {		for (Iterator ii = rsSet.iterator(); ii.hasNext(); )		    {			ResultSet rs = (ResultSet) ii.next();			try			    { rs.close(); }			catch (SQLException e)			    {				if (Debug.DEBUG)				    logger.log(MLevel.WARNING, "An exception occurred while cleaning up a ResultSet.", e);				    //e.printStackTrace();				okay = false;			    }			finally 			    { ii.remove(); }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久色视频免费观看| 日本怡春院一区二区| 国产亲近乱来精品视频| 日韩免费成人网| 欧美一激情一区二区三区| 欧美日韩亚洲丝袜制服| 欧美伊人精品成人久久综合97 | 91久久精品网| 一本久久综合亚洲鲁鲁五月天| 91在线精品秘密一区二区| 99国产精品久久久| 在线精品观看国产| 欧美色涩在线第一页| 欧美片网站yy| 91精品欧美一区二区三区综合在| 日韩亚洲欧美在线观看| 精品福利一区二区三区免费视频| 亚洲精品一区二区三区99| 国产清纯美女被跳蛋高潮一区二区久久w | 久久精品一区蜜桃臀影院| 久久久久久久综合狠狠综合| 中文字幕第一区综合| 国产精品久线在线观看| 亚洲男女一区二区三区| 亚洲va欧美va人人爽| 蜜臀精品一区二区三区在线观看| 韩国女主播一区二区三区| 成人午夜激情片| 日本高清视频一区二区| 91 com成人网| 国产午夜精品久久久久久久| 亚洲人快播电影网| 午夜欧美大尺度福利影院在线看| 免费在线观看一区二区三区| 国产乱码字幕精品高清av| av亚洲精华国产精华| 欧美日韩一区成人| 欧美精品一区视频| 樱桃国产成人精品视频| 日韩不卡一区二区三区| 国产+成+人+亚洲欧洲自线| 日本韩国精品一区二区在线观看| 日韩欧美一区二区视频| 国产精品无人区| 亚洲成人激情自拍| 国产一区二区视频在线播放| 91丨九色丨蝌蚪丨老版| 91麻豆精品国产无毒不卡在线观看| 久久综合国产精品| 亚洲精品国产精品乱码不99 | 欧美亚洲国产一区二区三区va| 欧美一级黄色大片| 亚洲日本韩国一区| 美女久久久精品| 99riav久久精品riav| 日韩女同互慰一区二区| 亚洲女人小视频在线观看| 久热成人在线视频| 欧美在线看片a免费观看| 久久久91精品国产一区二区精品| 亚洲一区二区三区三| 国产成人无遮挡在线视频| 欧美精品在线一区二区三区| 亚洲欧洲精品一区二区三区不卡| 秋霞电影一区二区| 欧美中文字幕一二三区视频| 亚洲国产精品黑人久久久| 美女视频一区在线观看| 在线视频你懂得一区二区三区| 久久亚洲二区三区| 三级在线观看一区二区| 色老汉av一区二区三区| 国产女人18水真多18精品一级做| 五月天欧美精品| 一本一本大道香蕉久在线精品| 国产拍揄自揄精品视频麻豆| 久久精品国产在热久久| 欧美久久久一区| 亚洲第一福利视频在线| 91在线视频免费观看| 久久久久久久久久久电影| 久久草av在线| 日韩一区二区三区视频在线观看| 亚洲午夜久久久久久久久电影院| 91浏览器打开| 国产精品毛片久久久久久久| 国产精品一区二区x88av| 日韩精品中午字幕| 日本欧美一区二区| 欧美乱妇20p| 午夜精品一区在线观看| 91久久线看在观草草青青| 国产精品久久国产精麻豆99网站| 丁香激情综合国产| 国产视频视频一区| 国产精品亚洲人在线观看| 日韩视频一区二区在线观看| 美女视频黄a大片欧美| 日韩欧美国产一区在线观看| 免费在线一区观看| 日韩欧美另类在线| 国内精品伊人久久久久影院对白| 日韩一区二区三区在线| 久久精品国产成人一区二区三区 | 日韩欧美成人激情| 免费观看日韩av| 日韩美女在线视频| 九九精品视频在线看| 精品国产一区二区三区忘忧草 | 欧美一级高清片| 久久国产精品色| 精品福利一二区| 国产成人亚洲精品狼色在线| 国产精品女同一区二区三区| av综合在线播放| 亚洲男人的天堂在线aⅴ视频| 色综合久久九月婷婷色综合| 亚洲一区影音先锋| 欧美一区二区三区在线观看| 蜜桃av噜噜一区| 国产午夜三级一区二区三| 波多野结衣在线一区| 亚洲激情图片小说视频| 欧美日本高清视频在线观看| 老司机免费视频一区二区| 精品久久99ma| 成人国产精品免费网站| 亚洲女爱视频在线| 欧美片网站yy| 国产一区亚洲一区| 中文字幕五月欧美| 欧美色爱综合网| 久久99蜜桃精品| 中文字幕永久在线不卡| 欧美人与z0zoxxxx视频| 国产毛片精品视频| 自拍偷拍国产亚洲| 在线电影国产精品| 国产精品系列在线观看| 亚洲精品日产精品乱码不卡| 91精品免费在线| 成人黄色av网站在线| 亚洲成av人片一区二区三区| 久久亚洲私人国产精品va媚药| 99久久99久久久精品齐齐| 亚洲第四色夜色| 欧美精彩视频一区二区三区| 在线视频欧美精品| 国产在线看一区| 夜夜亚洲天天久久| 2019国产精品| 91美女在线观看| 麻豆久久久久久| 一区二区三区四区乱视频| 欧美精品一区二区蜜臀亚洲| 在线影视一区二区三区| 久久99国产精品久久99果冻传媒| 日韩理论在线观看| 欧美成人猛片aaaaaaa| 欧美亚日韩国产aⅴ精品中极品| 国内欧美视频一区二区| 性做久久久久久久免费看| 国产精品久久午夜夜伦鲁鲁| 日韩精品一区二区三区蜜臀| 在线视频一区二区三区| 国产一区二区伦理| 天天色天天操综合| 国产精品国产三级国产aⅴ中文| 欧美一区二区免费观在线| 91视频.com| 国产成人一级电影| 蜜臀精品久久久久久蜜臀| 一区二区三区四区亚洲| 国产精品嫩草影院av蜜臀| 欧美电影免费观看高清完整版| 在线免费观看不卡av| 成人免费电影视频| 精品一区二区三区在线观看| 亚洲一级电影视频| 亚洲欧洲在线观看av| 精品sm捆绑视频| 日韩一区二区免费在线观看| 欧美曰成人黄网| 色老综合老女人久久久| 成人蜜臀av电影| 国产传媒久久文化传媒| 久久99久久久久| 日韩精品高清不卡| 亚洲大片精品永久免费| 一区二区久久久| 亚洲欧洲韩国日本视频| 欧美激情综合在线| 久久久久久亚洲综合影院红桃 | 亚欧色一区w666天堂| 一区二区三区国产精华| 一区二区在线观看视频| 亚洲色图色小说| 国产精品视频九色porn| 国产精品乱子久久久久| 欧美国产精品v|