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

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

?? datasourcetest.java

?? mysql jdbc驅(qū)動(dòng)程序 mysql jdbc驅(qū)動(dòng)程序 mysql jdbc驅(qū)動(dòng)程序 mysql jdbc驅(qū)動(dòng)程序
?? JAVA
字號(hào):
/* Copyright (C) 2002-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as  published by the Free Software Foundation. There are special exceptions to the terms and conditions of the GPL  as it is applied to this software. View the full text of the  exception in file EXCEPTIONS-CONNECTOR-J in the directory of this  software distribution. 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 testsuite.simple;import testsuite.BaseTestCase;import java.io.File;import java.sql.Connection;import java.util.Hashtable;import javax.naming.Context;import javax.naming.InitialContext;import javax.naming.Name;import javax.naming.NameParser;import javax.naming.Reference;import javax.naming.spi.ObjectFactory;import javax.sql.DataSource;import javax.sql.PooledConnection;import com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource;import com.mysql.jdbc.jdbc2.optional.MysqlXADataSource;/** *  * @author Mark Matthews * @version $Id: DataSourceTest.java 6326 2007-02-27 15:02:54Z mmatthews $ */public class DataSourceTest extends BaseTestCase {	// ~ Instance fields	// --------------------------------------------------------	private Context ctx;	private File tempDir;	// ~ Constructors	// -----------------------------------------------------------	/**	 * Creates a new DataSourceTest object.	 * 	 * @param name	 *            DOCUMENT ME!	 */	public DataSourceTest(String name) {		super(name);	}	// ~ Methods	// ----------------------------------------------------------------	/**	 * Runs all test cases in this test suite	 * 	 * @param args	 */	public static void main(String[] args) {		junit.textui.TestRunner.run(DataSourceTest.class);	}	/**	 * Sets up this test, calling registerDataSource() to bind a DataSource into	 * JNDI, using the FSContext JNDI provider from Sun	 * 	 * @throws Exception	 *             if an error occurs.	 */	public void setUp() throws Exception {		super.setUp();		registerDataSource();	}	/**	 * Un-binds the DataSource, and cleans up the filesystem	 * 	 * @throws Exception	 *             if an error occurs	 */	public void tearDown() throws Exception {		this.ctx.unbind(this.tempDir.getAbsolutePath() + "/test");		this.ctx.close();		this.tempDir.delete();		super.tearDown();	}	/**	 * Tests that we can get a connection from the DataSource bound in JNDI	 * during test setup	 * 	 * @throws Exception	 *             if an error occurs	 */	public void testDataSource() throws Exception {		NameParser nameParser = this.ctx.getNameParser("");		Name datasourceName = nameParser.parse(this.tempDir.getAbsolutePath()				+ "/test");		Object obj = this.ctx.lookup(datasourceName);		DataSource boundDs = null;		if (obj instanceof DataSource) {			boundDs = (DataSource) obj;		} else if (obj instanceof Reference) {			//			// For some reason, this comes back as a Reference			// instance under CruiseControl !?			//			Reference objAsRef = (Reference) obj;			ObjectFactory factory = (ObjectFactory) Class.forName(					objAsRef.getFactoryClassName()).newInstance();			boundDs = (DataSource) factory.getObjectInstance(objAsRef,					datasourceName, this.ctx, new Hashtable());		}		assertTrue("Datasource not bound", boundDs != null);		Connection con = boundDs.getConnection();		con.close();		assertTrue("Connection can not be obtained from data source",				con != null);	}	/**	 * Tests whether Connection.changeUser() (and thus pooled connections)	 * restore character set information correctly.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testChangeUserAndCharsets() throws Exception {		if (versionMeetsMinimum(4, 1)) {			MysqlConnectionPoolDataSource ds = new MysqlConnectionPoolDataSource();			ds.setURL(BaseTestCase.dbUrl);			ds.setCharacterEncoding("utf-8");			PooledConnection pooledConnection = ds.getPooledConnection();			Connection connToMySQL = pooledConnection.getConnection();			this.rs = connToMySQL.createStatement().executeQuery(					"SELECT @@character_set_results");			assertTrue(this.rs.next());						String toCheck = null;						if (versionMeetsMinimum(4, 1, 15)) {				if (versionMeetsMinimum(5, 0)) {					if (versionMeetsMinimum(5, 0, 13)) {						toCheck = null;					} else {						toCheck = "NULL";					}				} else {					toCheck = null;				}			} else {				toCheck = "NULL";			}						assertEquals(toCheck, this.rs.getString(1));			this.rs = connToMySQL.createStatement().executeQuery(					"SHOW VARIABLES LIKE 'character_set_client'");			assertTrue(this.rs.next());			assertEquals("utf8", this.rs.getString(2));			connToMySQL.close();			connToMySQL = pooledConnection.getConnection();			this.rs = connToMySQL.createStatement().executeQuery(					"SELECT @@character_set_results");			assertTrue(this.rs.next());			assertEquals(toCheck, this.rs.getString(1));			this.rs = connToMySQL.createStatement().executeQuery(					"SHOW VARIABLES LIKE 'character_set_client'");			assertTrue(this.rs.next());			assertEquals("utf8", this.rs.getString(2));			pooledConnection.getConnection().close();		}	}	/**	 * Tests whether XADataSources can be bound into JNDI	 * 	 * @throws Exception if the test fails.	 */	public void testXADataSource() throws Exception {			MysqlXADataSource ds = new MysqlXADataSource();		ds.setUrl(dbUrl);				String name = "XA";		this.ctx.rebind(name, ds);		Object result = this.ctx.lookup(name);		assertNotNull("XADataSource not bound into JNDI", result);	}		/**	 * This method is separated from the rest of the example since you normally	 * would NOT register a JDBC driver in your code. It would likely be	 * configered into your naming and directory service using some GUI.	 * 	 * @throws Exception	 *             if an error occurs	 */	private void registerDataSource() throws Exception {		this.tempDir = File.createTempFile("jnditest", null);		this.tempDir.delete();		this.tempDir.mkdir();		this.tempDir.deleteOnExit();		com.mysql.jdbc.jdbc2.optional.MysqlDataSource ds;		Hashtable env = new Hashtable();		env.put(Context.INITIAL_CONTEXT_FACTORY,				"com.sun.jndi.fscontext.RefFSContextFactory");		this.ctx = new InitialContext(env);		assertTrue("Naming Context not created", this.ctx != null);		ds = new com.mysql.jdbc.jdbc2.optional.MysqlDataSource();		ds.setUrl(dbUrl); // from BaseTestCase		this.ctx.bind(this.tempDir.getAbsolutePath() + "/test", ds);	}}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品视频观看| 亚洲精品久久嫩草网站秘色| av午夜一区麻豆| 亚洲第一二三四区| 国产视频一区二区在线观看| 欧美少妇性性性| 国产成a人亚洲| 久久精品国产99国产| 亚洲综合偷拍欧美一区色| 亚洲国产成人一区二区三区| 538在线一区二区精品国产| 99国产精品视频免费观看| 国产综合色视频| 蜜桃视频一区二区三区| 一区二区高清在线| 亚洲人精品一区| 中文字幕一区二区三区四区| 欧美精品一区二区久久久| 69精品人人人人| 欧美中文字幕一区| 99久久免费国产| 成人a级免费电影| 国产福利一区二区| 久草这里只有精品视频| 天天色图综合网| 亚洲二区在线视频| 一区二区三区在线免费视频| 国产精品二三区| 国产精品国产自产拍高清av| 久久久久国产精品免费免费搜索| 91精品国产色综合久久不卡电影| 在线观看日韩高清av| 91在线观看一区二区| 国产91精品久久久久久久网曝门| 国产精品自在在线| 国产精品亚洲人在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎| 日韩主播视频在线| 日本中文字幕一区| 偷拍一区二区三区| 日韩精品三区四区| 日韩激情一二三区| 日韩高清不卡在线| 青椒成人免费视频| 久久er99热精品一区二区| 日韩av高清在线观看| 日产国产高清一区二区三区| 日韩精品色哟哟| 麻豆成人91精品二区三区| 精品亚洲免费视频| 国产成人av资源| bt7086福利一区国产| 91香蕉视频黄| 欧美日韩国产综合一区二区三区| 欧美日韩国产一级片| 91精品福利在线一区二区三区| 91麻豆精品国产91久久久使用方法 | 日韩亚洲国产中文字幕欧美| 欧美亚洲图片小说| 欧美一区二区三区精品| 精品裸体舞一区二区三区| 中文天堂在线一区| 亚洲一二三四在线| 美女mm1313爽爽久久久蜜臀| 国产一区二区在线观看免费| k8久久久一区二区三区| 在线免费观看日本一区| 7777精品伊人久久久大香线蕉最新版| 91精品欧美久久久久久动漫| 精品国产一区二区三区久久久蜜月| 久久毛片高清国产| 中文字幕一区二区三区不卡| 亚洲制服丝袜在线| 国模少妇一区二区三区| 成人毛片老司机大片| 欧美在线一区二区| 日韩精品一区二区在线观看| 久久―日本道色综合久久| **网站欧美大片在线观看| 日韩av中文在线观看| 成人午夜电影小说| 欧美精品在线观看一区二区| 国产亚洲成aⅴ人片在线观看| 亚洲精品欧美在线| 韩国女主播一区| 欧美视频中文字幕| 国产欧美日产一区| 日韩和欧美的一区| 99在线精品观看| 欧美成人a在线| 亚洲一区免费视频| 成人性生交大片免费看在线播放| 欧美在线观看视频一区二区三区 | 欧美日韩电影在线播放| 欧美韩国日本不卡| 天堂在线亚洲视频| 大陆成人av片| 日韩久久精品一区| 五月婷婷综合网| 99久久久久免费精品国产 | 9i在线看片成人免费| 欧美精品 日韩| 亚洲欧美一区二区三区国产精品| 麻豆传媒一区二区三区| 欧美三级中文字幕在线观看| 欧美激情一区在线观看| 久久99精品一区二区三区| 在线亚洲+欧美+日本专区| 国产日韩三级在线| 国产一区 二区 三区一级| 欧美日产在线观看| 夜夜精品视频一区二区| 成人免费观看av| 久久久久国产精品人| 久久精品国产精品亚洲综合| 欧美高清一级片在线| 亚洲精品日韩综合观看成人91| 高清不卡一区二区| 国产清纯在线一区二区www| 韩国v欧美v日本v亚洲v| 555夜色666亚洲国产免| 五月天中文字幕一区二区| 91成人免费在线| 亚洲精品v日韩精品| 99久久亚洲一区二区三区青草| 中文字幕精品综合| 国产福利电影一区二区三区| 精品久久人人做人人爰| 久草在线在线精品观看| 精品国产精品一区二区夜夜嗨| 久久er99精品| 精品国产乱码91久久久久久网站| 另类小说综合欧美亚洲| 日韩美女天天操| 国产精品资源在线观看| 久久久久久久久久久久久夜| 国产精品一区二区在线看| 久久婷婷久久一区二区三区| 国产一区91精品张津瑜| 久久伊人蜜桃av一区二区| 国产美女av一区二区三区| 久久久国产精华| 国产成人精品免费视频网站| 亚洲视频在线一区二区| 色综合天天做天天爱| 一片黄亚洲嫩模| 欧美精品在欧美一区二区少妇| 日韩电影一区二区三区| 精品粉嫩aⅴ一区二区三区四区| 国产尤物一区二区在线| 国产日产欧美一区| 一本一道综合狠狠老| 亚洲成人自拍一区| 欧美一卡二卡三卡四卡| 国产在线精品一区二区不卡了| 国产喂奶挤奶一区二区三区| 成人一级视频在线观看| 一区二区三区欧美| 91精品免费在线| 成人在线一区二区三区| 亚洲图片激情小说| 欧美夫妻性生活| 激情综合五月天| 中文字幕一区二区三区视频| 91传媒视频在线播放| 日本欧美韩国一区三区| 久久伊人蜜桃av一区二区| 91麻豆精品在线观看| 日本午夜一区二区| 欧美激情自拍偷拍| 911精品产国品一二三产区| 国产99久久久国产精品潘金| 日韩一区欧美小说| 8x福利精品第一导航| 成人夜色视频网站在线观看| 亚洲综合免费观看高清完整版在线 | av不卡在线播放| 奇米精品一区二区三区在线观看一 | 日韩欧美国产一区在线观看| 成人高清免费观看| 日韩在线a电影| 中文字幕一区二区在线观看| 91精品国产综合久久久久久| 国产成人夜色高潮福利影视| 一区二区三区四区国产精品| 日韩精品一区二区三区视频| 色综合色综合色综合色综合色综合| 日韩国产欧美三级| 中文字幕一区二区三区在线播放 | 色999日韩国产欧美一区二区| 免费成人在线观看视频| 国产精品成人免费在线| 91精品中文字幕一区二区三区| 成人动漫一区二区| 看电影不卡的网站| 一区二区三区在线视频免费 | 色偷偷久久一区二区三区| 韩国视频一区二区| 亚洲chinese男男1069| 国产精品久久久久久一区二区三区|