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

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

?? wrapperconnectionpooldatasource.java

?? c3p0數據庫連接池實現源碼
?? JAVA
字號:
/* * 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;import java.beans.PropertyChangeEvent;import java.beans.PropertyVetoException;import java.beans.VetoableChangeListener;import java.beans.PropertyChangeListener;import java.io.PrintWriter;import java.lang.reflect.Method;import java.util.Map;import java.sql.*;import javax.sql.*;import com.mchange.v2.c3p0.cfg.C3P0Config;import com.mchange.v2.c3p0.impl.*;import com.mchange.v2.log.*;// MT: Most methods are left unsynchronized, because getNestedDataSource() is synchronized, and for most methods, that's//     the critical part. Previous oversynchronization led to hangs, when getting the Connection for one Thread happened//     to hang, blocking access to getPooledConnection() for all Threads.public final class WrapperConnectionPoolDataSource extends WrapperConnectionPoolDataSourceBase implements ConnectionPoolDataSource{    final static MLogger logger = MLog.getLogger( WrapperConnectionPoolDataSource.class );    //MT: protected by this' lock    ConnectionTester connectionTester = C3P0ImplUtils.defaultConnectionTester();    Map              userOverrides;    public WrapperConnectionPoolDataSource()    {	VetoableChangeListener setConnectionTesterListener = new VetoableChangeListener()	    {		// always called within synchronized mutators of the parent class... needn't explicitly sync here		public void vetoableChange( PropertyChangeEvent evt ) throws PropertyVetoException		{		    String propName = evt.getPropertyName();		    Object val = evt.getNewValue();		    if ( "connectionTesterClassName".equals( propName ) )			{			    try				{ recreateConnectionTester( (String) val ); }			    catch ( Exception e )				{				    //e.printStackTrace();				    if ( logger.isLoggable( MLevel.WARNING ) )					logger.log( MLevel.WARNING, "Failed to create ConnectionTester of class " + val, e );				    				    throw new PropertyVetoException("Could not instantiate connection tester class with name '" + val + "'.", evt);				}			}		    else if ("userOverridesAsString".equals( propName ))			{			    try				{ WrapperConnectionPoolDataSource.this.userOverrides = C3P0ImplUtils.parseUserOverridesAsString( (String) val ); }			    catch (Exception e)				{				    if ( logger.isLoggable( MLevel.WARNING ) )					logger.log( MLevel.WARNING, "Failed to parse stringified userOverrides. " + val, e );				    				    throw new PropertyVetoException("Failed to parse stringified userOverrides. " + val, evt);				}			}		}	    };	this.addVetoableChangeListener( setConnectionTesterListener );	//set up initial value of userOverrides	try	    { this.userOverrides = C3P0ImplUtils.parseUserOverridesAsString( this.getUserOverridesAsString() ); }	catch (Exception e)	    {		if ( logger.isLoggable( MLevel.WARNING ) )		    logger.log( MLevel.WARNING, "Failed to parse stringified userOverrides. " + this.getUserOverridesAsString(), e );	    }	C3P0Registry.register( this );    }    public WrapperConnectionPoolDataSource( String configName )    {	this();		try	    {		if (configName != null)		    C3P0Config.bindNamedConfigToBean( this, configName ); 	    }	catch (Exception e)	    {		if (logger.isLoggable( MLevel.WARNING ))		    logger.log( MLevel.WARNING, 				"Error binding WrapperConnectionPoolDataSource to named-config '" + configName + 				"'. Some default-config values may be used.", 				e);	    }    }    // implementation of javax.sql.ConnectionPoolDataSource    //    // getNestedDataSource() is sync'ed, which is enough. Unsync'ed this method,    // because when sync'ed a hang in retrieving one connection blocks all    //    public PooledConnection getPooledConnection()	throws SQLException    { 	DataSource nds = getNestedDataSource();	if (nds == null)	    throw new SQLException( "No standard DataSource has been set beneath this wrapper! [ nestedDataSource == null ]");	Connection conn = nds.getConnection();	if (conn == null)	    throw new SQLException("An (unpooled) DataSource returned null from its getConnection() method! " +				   "DataSource: " + getNestedDataSource());	if ( this.isUsesTraditionalReflectiveProxies() )	    {		//return new C3P0PooledConnection( new com.mchange.v2.c3p0.test.CloseReportingConnection( conn ), 		return new C3P0PooledConnection( conn, 						 connectionTester,						 this.isAutoCommitOnClose(), 						 this.isForceIgnoreUnresolvedTransactions() ); 	    }	else	    {		return new NewPooledConnection( conn, 						connectionTester,						this.isAutoCommitOnClose(), 						this.isForceIgnoreUnresolvedTransactions() ); 	    }    }      // getNestedDataSource() is sync'ed, which is enough. Unsync'ed this method,    // because when sync'ed a hang in retrieving one connection blocks all    //    public PooledConnection getPooledConnection(String user, String password)	throws SQLException    { 	DataSource nds = getNestedDataSource();	if (nds == null)	    throw new SQLException( "No standard DataSource has been set beneath this wrapper! [ nestedDataSource == null ]");	Connection conn = nds.getConnection(user, password);	if (conn == null)	    throw new SQLException("An (unpooled) DataSource returned null from its getConnection() method! " +				   "DataSource: " + getNestedDataSource());	if ( this.isUsesTraditionalReflectiveProxies() )	    {		//return new C3P0PooledConnection( new com.mchange.v2.c3p0.test.CloseReportingConnection( conn ), 		return new C3P0PooledConnection( conn,						 connectionTester,						 this.isAutoCommitOnClose(), 						 this.isForceIgnoreUnresolvedTransactions() ); 	    }	else	    {		return new NewPooledConnection( conn, 						connectionTester,						this.isAutoCommitOnClose(), 						this.isForceIgnoreUnresolvedTransactions() ); 	    }    }     public PrintWriter getLogWriter()	throws SQLException    { return getNestedDataSource().getLogWriter(); }    public void setLogWriter(PrintWriter out)	throws SQLException    { getNestedDataSource().setLogWriter( out ); }    public void setLoginTimeout(int seconds)	throws SQLException    { getNestedDataSource().setLoginTimeout( seconds ); }    public int getLoginTimeout()	throws SQLException    { return getNestedDataSource().getLoginTimeout(); }    //"virtual properties"    public String getUser()    { 	try { return C3P0ImplUtils.findAuth( this.getNestedDataSource() ).getUser(); }	catch (SQLException e)	    {		//e.printStackTrace();		if ( logger.isLoggable( MLevel.WARNING ) )		    logger.log( MLevel.WARNING, 				"An Exception occurred while trying to find the 'user' property from our nested DataSource." +				" Defaulting to no specified username.", e );		return null; 	    }    }    public String getPassword()    { 	try { return C3P0ImplUtils.findAuth( this.getNestedDataSource() ).getPassword(); }	catch (SQLException e)	    { 		//e.printStackTrace();		if ( logger.isLoggable( MLevel.WARNING ) )		    logger.log( MLevel.WARNING, "An Exception occurred while trying to find the 'password' property from our nested DataSource." + 				" Defaulting to no specified password.", e );		return null; 	    }    }    public Map getUserOverrides()    { return userOverrides; }    public String toString()    {	StringBuffer sb = new StringBuffer();	sb.append( super.toString() );// 	if (userOverrides != null)// 	    sb.append("; userOverrides: " + userOverrides.toString());	return sb.toString();    }    protected String extraToStringInfo()    {	if (userOverrides != null)	    return "; userOverrides: " + userOverrides.toString();	else	    return null;    }    //other code    private synchronized void recreateConnectionTester(String className) throws Exception    {	if (className != null)	    {		ConnectionTester ct = (ConnectionTester) Class.forName( className ).newInstance();		this.connectionTester = ct;	    }	else	    this.connectionTester = C3P0ImplUtils.defaultConnectionTester();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产一级片| 91美女蜜桃在线| 日韩欧美国产综合在线一区二区三区| 亚洲国产一二三| 777xxx欧美| 裸体歌舞表演一区二区| 久久久综合网站| av亚洲精华国产精华| 亚洲精品水蜜桃| 欧美肥胖老妇做爰| 激情欧美一区二区| 国产精品女上位| 欧洲视频一区二区| 久久精品国产亚洲a| 久久久久国产精品麻豆ai换脸| 成人午夜激情在线| 一区二区国产盗摄色噜噜| 91精品国产一区二区三区蜜臀 | 91老司机福利 在线| 亚洲一区免费观看| 精品国产一区二区三区av性色 | 国产美女娇喘av呻吟久久| 日韩西西人体444www| 懂色av一区二区三区免费观看| 亚洲精品欧美二区三区中文字幕| 91精品国产乱| 99久久国产综合精品色伊| 免费在线观看视频一区| 国产精品视频一区二区三区不卡| 欧美美女一区二区在线观看| 国产精品一区二区在线观看网站| 亚洲一区视频在线| 国产精品毛片久久久久久| 欧美日韩精品三区| 成人国产在线观看| 精品在线你懂的| 一区二区三区四区高清精品免费观看| 日韩免费观看2025年上映的电影| www.久久久久久久久| 蜜桃视频在线观看一区| 亚洲欧美日韩久久| 国产三级精品三级| 欧美一区二区三区四区在线观看| av高清久久久| 国产二区国产一区在线观看| 日本网站在线观看一区二区三区| 成人免费一区二区三区在线观看| 精品国产露脸精彩对白| 欧美性淫爽ww久久久久无| 成人免费视频免费观看| 国产一区二区视频在线播放| 亚洲成年人影院| 亚洲天堂免费看| 欧美激情一区二区三区蜜桃视频| 日韩一卡二卡三卡| 欧美日韩另类一区| 欧美一a一片一级一片| 99re热这里只有精品视频| 国产成人午夜视频| 国内不卡的二区三区中文字幕| 婷婷综合久久一区二区三区| 亚洲精品国产精华液| 综合久久久久久| 亚洲欧美怡红院| 国产精品久久久久久久久免费相片 | 久久影视一区二区| 欧美一区二区三区在线电影| 精品视频在线免费观看| 色综合天天在线| 一本久久精品一区二区| 91在线国产观看| 色综合中文字幕国产 | 精品免费一区二区三区| 欧美精品乱人伦久久久久久| 欧美这里有精品| 欧美怡红院视频| 欧美日韩成人综合在线一区二区 | 午夜精品福利在线| 一区二区三区国产精品| 亚洲永久精品国产| 日韩av在线发布| 亚洲国产精品天堂| 视频一区在线视频| 久久激情五月婷婷| 国内精品伊人久久久久av一坑| 韩国av一区二区三区四区| 国产精品性做久久久久久| 国产伦精品一区二区三区视频青涩| 狠狠色综合日日| 成人自拍视频在线观看| thepron国产精品| 欧美在线观看视频一区二区| 在线成人免费视频| 精品久久久久久最新网址| 久久精品视频免费| 亚洲精品写真福利| 日本aⅴ精品一区二区三区| 久久精品999| 99久久国产综合精品色伊| 欧美在线观看禁18| 日韩欧美电影在线| 国产精品久久久久影视| 亚洲午夜久久久久久久久电影网| 日韩精品一卡二卡三卡四卡无卡| 国产在线不卡一区| 99re视频精品| 日韩视频在线观看一区二区| 久久精品亚洲精品国产欧美kt∨| 亚洲欧洲日产国产综合网| 亚洲国产成人tv| 国产精品小仙女| 欧美午夜影院一区| 久久久久久免费| 亚洲精选免费视频| 精品在线观看视频| 在线免费不卡电影| 久久先锋影音av鲁色资源| 亚洲美女屁股眼交3| 久久99精品国产91久久来源| 91免费观看国产| 日韩免费高清av| 亚洲精品乱码久久久久久黑人| 美国毛片一区二区三区| 91丨九色porny丨蝌蚪| 精品粉嫩aⅴ一区二区三区四区| 欧美国产一区二区在线观看 | 精品国产麻豆免费人成网站| 亚洲欧洲av在线| 另类小说视频一区二区| 一本大道av一区二区在线播放 | 成人激情黄色小说| 日韩一级高清毛片| 一区二区三区中文在线观看| 国产精品18久久久久久久网站| 欧美色图在线观看| 最新国产成人在线观看| 国产精品自在欧美一区| 欧美二区在线观看| 亚洲精品v日韩精品| 成人av综合一区| 亚洲精品一区二区三区福利 | 中文字幕一区av| 国产精选一区二区三区| 日韩一级大片在线观看| 亚洲大型综合色站| 色综合久久久久网| 国产精品久久久久aaaa| 国产一区二区伦理| 8x8x8国产精品| 午夜久久久久久久久久一区二区| www.视频一区| 亚洲黄网站在线观看| 国产成人精品综合在线观看| 日韩精品一区二区三区视频播放 | 天天操天天综合网| 欧美在线制服丝袜| 亚洲视频电影在线| 成人av资源下载| 国产欧美一区二区三区网站| 国产麻豆精品在线| 久久久777精品电影网影网 | 欧美一区二区三区精品| 亚洲aⅴ怡春院| 欧美精选午夜久久久乱码6080| 亚洲国产另类av| 欧美日韩精品免费观看视频| 亚洲午夜免费福利视频| 欧美色综合影院| 午夜婷婷国产麻豆精品| 欧美日韩国产综合一区二区 | 美女一区二区久久| 日韩一级大片在线观看| 老司机午夜精品99久久| 精品国产免费久久| 国产真实乱子伦精品视频| 精品国产乱码久久久久久免费| 国内精品伊人久久久久av影院| 久久久久久亚洲综合| 成人午夜免费电影| 亚洲男人的天堂一区二区| 色综合久久中文字幕综合网 | 蜜臀av亚洲一区中文字幕| 91精品久久久久久久99蜜桃| 蜜臀va亚洲va欧美va天堂 | 一区在线观看免费| 在线免费观看日本欧美| 日韩综合一区二区| 久久影音资源网| 不卡一区二区三区四区| 一区二区三区日韩精品视频| 欧美日本视频在线| 国产一区二区三区四区五区美女| 欧美国产丝袜视频| 欧美三级韩国三级日本一级| 亚洲成人黄色影院| 中文字幕永久在线不卡| 色天天综合色天天久久| 亚洲超碰97人人做人人爱| 欧美日韩一区 二区 三区 久久精品| 日韩综合在线视频|