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

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

?? mysqldatasource.java

?? mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序
?? JAVA
字號:
/* Copyright (C) 2002-2004 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 com.mysql.jdbc.jdbc2.optional;import com.mysql.jdbc.ConnectionProperties;import com.mysql.jdbc.NonRegisteringDriver;import java.io.PrintWriter;import java.io.Serializable;import java.sql.SQLException;import java.util.Properties;import javax.naming.NamingException;import javax.naming.Reference;import javax.naming.Referenceable;import javax.naming.StringRefAddr;import javax.sql.DataSource;/** * A JNDI DataSource for a Mysql JDBC connection *  * @author Mark Matthews */public class MysqlDataSource extends ConnectionProperties implements		DataSource, Referenceable, Serializable {	/** The driver to create connections with */	protected static com.mysql.jdbc.Driver mysqlDriver = null;	static {		try {			mysqlDriver = (com.mysql.jdbc.Driver) Class.forName(					"com.mysql.jdbc.Driver").newInstance();		} catch (Exception E) {			throw new RuntimeException(					"Can not load Driver class com.mysql.jdbc.Driver");		}	}	/** Log stream */	protected PrintWriter logWriter = null;	/** Database Name */	protected String databaseName = null;	/** Character Encoding */	protected String encoding = null;	/** Hostname */	protected String hostName = null;	/** Password */	protected String password = null;	/** The profileSql property */	protected String profileSql = "false";	/** The JDBC URL */	protected String url = null;	/** User name */	protected String user = null;	/** Should we construct the URL, or has it been set explicitly */	protected boolean explicitUrl = false;	/** Port number */	protected int port = 3306;	/**	 * Default no-arg constructor for Serialization	 */	public MysqlDataSource() {	}	/**	 * Creates a new connection using the already configured username and	 * password.	 * 	 * @return a connection to the database	 * 	 * @throws SQLException	 *             if an error occurs	 */	public java.sql.Connection getConnection() throws SQLException {		return getConnection(this.user, this.password);	}	/**	 * Creates a new connection with the given username and password	 * 	 * @param userID	 *            the user id to connect with	 * @param password	 *            the password to connect with	 * 	 * @return a connection to the database	 * 	 * @throws SQLException	 *             if an error occurs	 */	public java.sql.Connection getConnection(String userID, String pass)			throws SQLException {		Properties props = new Properties();		if (userID != null) {			props.setProperty(NonRegisteringDriver.USER_PROPERTY_KEY, userID);		}		if (pass != null) {			props.setProperty(NonRegisteringDriver.PASSWORD_PROPERTY_KEY, pass);		}		exposeAsProperties(props);		return getConnection(props);	}	/**	 * Sets the database name.	 * 	 * @param dbName	 *            the name of the database	 */	public void setDatabaseName(String dbName) {		this.databaseName = dbName;	}	/**	 * Gets the name of the database	 * 	 * @return the name of the database for this data source	 */	public String getDatabaseName() {		return (this.databaseName != null) ? this.databaseName : "";	}	/**	 * Sets the log writer for this data source.	 * 	 * @see javax.sql.DataSource#setLogWriter(PrintWriter)	 */	public void setLogWriter(PrintWriter output) throws SQLException {		this.logWriter = output;	}	/**	 * Returns the log writer for this data source	 * 	 * @return the log writer for this data source	 */	public java.io.PrintWriter getLogWriter() {		return this.logWriter;	}	/**	 * DOCUMENT ME!	 * 	 * @param seconds	 *            DOCUMENT ME!	 * 	 * @throws SQLException	 *             DOCUMENT ME!	 */	public void setLoginTimeout(int seconds) throws SQLException {	}	/**	 * Returns the login timeout	 * 	 * @return the login timeout	 */	public int getLoginTimeout() {		return 0;	}	/**	 * Sets the password	 * 	 * @param pass	 *            the password	 */	public void setPassword(String pass) {		this.password = pass;	}	/**	 * Sets the database port.	 * 	 * @param p	 *            the port	 */	public void setPort(int p) {		this.port = p;	}	/**	 * Returns the port number	 * 	 * @return the port number	 */	public int getPort() {		return this.port;	}	/**	 * Sets the port number	 * 	 * @param p	 *            the port	 * 	 * @see #setPort	 */	public void setPortNumber(int p) {		setPort(p);	}	/**	 * Returns the port number	 * 	 * @return the port number	 */	public int getPortNumber() {		return getPort();	}	/**	 * DOCUMENT ME!	 * 	 * @param ref	 *            DOCUMENT ME!	 * 	 * @throws SQLException	 *             DOCUMENT ME!	 */	public void setPropertiesViaRef(Reference ref) throws SQLException {		super.initializeFromRef(ref);	}	/**	 * Required method to support this class as a <CODE>Referenceable</CODE>.	 * 	 * @return a Reference to this data source	 * 	 * @throws NamingException	 *             if a JNDI error occurs	 */	public Reference getReference() throws NamingException {		String factoryName = "com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory";		Reference ref = new Reference(getClass().getName(), factoryName, null);		ref.add(new StringRefAddr(NonRegisteringDriver.USER_PROPERTY_KEY,				getUser()));		ref.add(new StringRefAddr(NonRegisteringDriver.PASSWORD_PROPERTY_KEY,				this.password));		ref.add(new StringRefAddr("serverName", getServerName()));		ref.add(new StringRefAddr("port", "" + getPort()));		ref.add(new StringRefAddr("databaseName", getDatabaseName()));		ref.add(new StringRefAddr("url", getUrl()));		ref.add(new StringRefAddr("explicitUrl", String				.valueOf(this.explicitUrl)));		//		// Now store all of the 'non-standard' properties...		//		try {			storeToRef(ref);		} catch (SQLException sqlEx) {			throw new NamingException(sqlEx.getMessage());		}		return ref;	}	/**	 * Sets the server name.	 * 	 * @param serverName	 *            the server name	 */	public void setServerName(String serverName) {		this.hostName = serverName;	}	/**	 * Returns the name of the database server	 * 	 * @return the name of the database server	 */	public String getServerName() {		return (this.hostName != null) ? this.hostName : "";	}	//	// I've seen application servers use both formats	// URL or url (doh)	//	/**	 * Sets the URL for this connection	 * 	 * @param url	 *            the URL for this connection	 */	public void setURL(String url) {		setUrl(url);	}	/**	 * Returns the URL for this connection	 * 	 * @return the URL for this connection	 */	public String getURL() {		return getUrl();	}	/**	 * This method is used by the app server to set the url string specified	 * within the datasource deployment descriptor. It is discovered using	 * introspection and matches if property name in descriptor is "url".	 * 	 * @param url	 *            url to be used within driver.connect	 */	public void setUrl(String url) {		this.url = url;		this.explicitUrl = true;	}	/**	 * Returns the JDBC URL that will be used to create the database connection.	 * 	 * @return the URL for this connection	 */	public String getUrl() {		if (!this.explicitUrl) {			String builtUrl = "jdbc:mysql://";			builtUrl = builtUrl + getServerName() + ":" + getPort() + "/"					+ getDatabaseName();			return builtUrl;		}		return this.url;	}	/**	 * Sets the user ID.	 * 	 * @param userID	 *            the User ID	 */	public void setUser(String userID) {		this.user = userID;	}	/**	 * Returns the configured user for this connection	 * 	 * @return the user for this connection	 */	public String getUser() {		return this.user;	}	/**	 * Creates a connection using the specified properties.	 * 	 * @param props	 *            the properties to connect with	 * 	 * @return a connection to the database	 * 	 * @throws SQLException	 *             if an error occurs	 */	protected java.sql.Connection getConnection(Properties props)			throws SQLException {		String jdbcUrlToUse = null;		if (!this.explicitUrl) {			StringBuffer jdbcUrl = new StringBuffer("jdbc:mysql://");			if (this.hostName != null) {				jdbcUrl.append(this.hostName);			}			jdbcUrl.append(":");			jdbcUrl.append(this.port);			jdbcUrl.append("/");			if (this.databaseName != null) {				jdbcUrl.append(this.databaseName);			}			jdbcUrlToUse = jdbcUrl.toString();		} else {			jdbcUrlToUse = this.url;		}		return mysqlDriver.connect(jdbcUrlToUse, props);	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区在线观看| 国产精品一二三四区| 91小视频在线免费看| 综合色中文字幕| 92精品国产成人观看免费| 日韩理论片网站| 在线视频一区二区三区| 天天综合天天做天天综合| 欧美一二三区在线观看| 国内精品自线一区二区三区视频| 国产日韩精品一区| 色婷婷亚洲精品| 美女尤物国产一区| 中文字幕精品三区| 欧美日韩国产经典色站一区二区三区 | 欧美mv和日韩mv的网站| 国产精品一区二区在线播放 | 欧美最猛性xxxxx直播| 香港成人在线视频| 久久先锋影音av鲁色资源网| 成人黄色777网| 亚洲成a人v欧美综合天堂| 久久久蜜桃精品| 色综合天天综合狠狠| 蜜桃传媒麻豆第一区在线观看| 国产欧美精品区一区二区三区 | 国产成人精品亚洲午夜麻豆| 亚洲欧美一区二区三区久本道91| 欧美日韩在线播放三区四区| 久久99精品久久只有精品| 中文字幕在线视频一区| 欧美电影在线免费观看| 成人中文字幕合集| 天堂一区二区在线免费观看| 欧美国产激情一区二区三区蜜月| 91福利区一区二区三区| 极品美女销魂一区二区三区| 亚洲综合精品久久| 国产视频一区在线播放| 欧美一级生活片| 色综合久久久久综合99| 国产精品综合av一区二区国产馆| 亚洲资源中文字幕| 欧美经典一区二区三区| 宅男噜噜噜66一区二区66| 99在线视频精品| 狠狠色狠狠色综合系列| 日日骚欧美日韩| 一区二区视频在线| 国产色一区二区| 久久综合丝袜日本网| 欧美精品自拍偷拍| 色网综合在线观看| 成人国产精品视频| 国产一区二区三区精品欧美日韩一区二区三区 | av一区二区三区四区| 国产在线视视频有精品| 日本少妇一区二区| 亚洲五码中文字幕| 亚洲最色的网站| 亚洲欧洲www| 国产精品毛片久久久久久久| 国产色婷婷亚洲99精品小说| 精品国产91乱码一区二区三区| 91.麻豆视频| 欧美高清视频在线高清观看mv色露露十八 | 337p日本欧洲亚洲大胆精品| 欧美精品粉嫩高潮一区二区| 欧美在线观看禁18| 色乱码一区二区三区88| 91亚洲永久精品| 97aⅴ精品视频一二三区| av午夜精品一区二区三区| 成人激情小说乱人伦| 成人黄色一级视频| kk眼镜猥琐国模调教系列一区二区| 国产成都精品91一区二区三| 成人性生交大片免费看在线播放| 国产一区二区精品久久91| 国产一区二区美女诱惑| 国产一区二区三区蝌蚪| 成人一区二区三区在线观看| av一区二区不卡| 91国产福利在线| 欧美日本国产一区| 精品国产乱码久久久久久夜甘婷婷| 欧美成人三级在线| 久久精品视频在线免费观看 | 亚洲视频资源在线| 夜夜精品浪潮av一区二区三区| 亚洲精品成人a在线观看| 亚洲国产综合色| 蜜臀国产一区二区三区在线播放| 蜜芽一区二区三区| 国产美女久久久久| 99视频精品全部免费在线| 欧美在线免费播放| 精品欧美一区二区久久| 欧美国产精品一区二区三区| 亚洲精品少妇30p| 美女脱光内衣内裤视频久久网站 | 欧美一级精品在线| 久久久久久久综合| 亚洲女同女同女同女同女同69| 午夜视频在线观看一区二区| 美女视频黄久久| 成人动漫精品一区二区| 欧美视频日韩视频在线观看| 日韩免费观看2025年上映的电影| 国产日韩精品一区| 亚洲国产成人porn| 国产传媒一区在线| 欧美天堂一区二区三区| 久久久久久亚洲综合影院红桃| 亚洲人成小说网站色在线 | 久久久91精品国产一区二区三区| 亚洲日本成人在线观看| 免费三级欧美电影| 色综合中文字幕国产 | 国产一区二区中文字幕| 色老综合老女人久久久| 久久蜜桃av一区精品变态类天堂| 亚洲黄色小说网站| 国产成人小视频| 5858s免费视频成人| 国产精品蜜臀在线观看| 蜜桃视频在线一区| 日本韩国欧美一区| 国产午夜精品久久久久久免费视 | 99久久99久久免费精品蜜臀| 91精品中文字幕一区二区三区| 欧美激情一区二区三区四区| 午夜影视日本亚洲欧洲精品| 成人午夜视频在线| 日韩精品一区二区在线| 亚洲综合色噜噜狠狠| 成人动漫一区二区| 久久免费视频色| 免费成人av资源网| 欧美乱熟臀69xxxxxx| 亚洲天堂成人网| 国产成人精品免费一区二区| 欧美一区二区日韩| 亚洲综合图片区| 91天堂素人约啪| 国产亚洲污的网站| 精品一区在线看| 欧美一区二区三区色| 亚洲午夜电影在线| 欧美最猛黑人xxxxx猛交| 综合久久给合久久狠狠狠97色 | 亚洲乱码国产乱码精品精小说| 国产成人亚洲精品狼色在线| 欧美videofree性高清杂交| 亚洲成av人片| 欧美剧情片在线观看| 一区二区三区电影在线播| 99视频一区二区| 国产精品久久久久久久久免费丝袜 | 欧美不卡一区二区三区四区| 午夜av电影一区| 欧美人体做爰大胆视频| 亚洲二区视频在线| 欧美午夜影院一区| 亚洲一区在线电影| 欧美三区在线观看| 亚洲国产精品久久久久婷婷884 | 日韩一区二区免费在线电影| 日韩中文字幕区一区有砖一区 | 91浏览器打开| 亚洲免费在线看| 在线观看网站黄不卡| 亚洲一区二区三区在线| 欧美色大人视频| 欧美aⅴ一区二区三区视频| 欧美一级高清片| 国产一区不卡在线| 国产欧美日韩亚州综合| 成人h动漫精品一区二| 亚洲视频电影在线| 欧美日韩一区二区不卡| 日本欧美一区二区在线观看| 精品免费国产二区三区| 国产999精品久久久久久| 国产精品国产a| 欧美三级欧美一级| 精品午夜久久福利影院| 中文字幕国产一区二区| 在线观看一区日韩| 麻豆国产欧美日韩综合精品二区| 精品黑人一区二区三区久久| 国产高清在线观看免费不卡| 亚洲欧美二区三区| 日韩欧美卡一卡二| 99久久久久免费精品国产 | 极品美女销魂一区二区三区| 国产精品色噜噜| 4438成人网| www.亚洲人| 美女爽到高潮91|