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

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

?? mysqldatasource.java

?? 基于java的oa系統
?? 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 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 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 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 transient 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(user, 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 password)        throws SQLException {        Properties props = new Properties();        if (userID == null) {            userID = "";        }        if (password == null) {            password = "";        }        props.put("user", userID);        props.put("password", password);        props.put("profileSql", getProfileSql());        return getConnection(props);    }    /**     * Sets the database name.     *     * @param dbName the name of the database     */    public void setDatabaseName(String dbName) {        databaseName = dbName;    }    /**     * Gets the name of the database     *     * @return the name of the database for this data source     */    public String getDatabaseName() {        return (databaseName != null) ? databaseName : "";    }    /**     * Sets the log writer for this data source.     *     * @see javax.sql.DataSource#setLogWriter(PrintWriter)     */    public void setLogWriter(PrintWriter output) throws SQLException {        logWriter = output;    }    /**     * Returns the log writer for this data source     *     * @return the log writer for this data source     */    public java.io.PrintWriter getLogWriter() {        return 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) {        password = pass;    }    /**     * Sets the database port.     *     * @param p the port     */    public void setPort(int p) {        port = p;    }    /**     * Returns the port number     *     * @return the port number     */    public int getPort() {        return 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();    }    /**     * Sets the profileSql property     *     * @param flag true/false     */    public void setProfileSql(String flag) {        profileSql = flag;    }    /**     * Returns the value for the profileSql property     *     * @return the value for the profileSql property     */    public String getProfileSql() {        return profileSql;    }    /**     * 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("user", getUser()));        ref.add(new StringRefAddr("password", password));        ref.add(new StringRefAddr("serverName", getServerName()));        ref.add(new StringRefAddr("port", "" + getPort()));        ref.add(new StringRefAddr("databaseName", getDatabaseName()));        ref.add(new StringRefAddr("profileSql", getProfileSql()));        ref.add(new StringRefAddr("explicitUrl", String.valueOf(this.explicitUrl)));        ref.add(new StringRefAddr("url", getUrl()));        return ref;    }    /**     * Sets the server name.     *     * @param serverName the server name     */    public void setServerName(String serverName) {        hostName = serverName;    }    /**     * Returns the name of the database server     *     * @return the name of the database server     */    public String getServerName() {        return (hostName != null) ? 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;        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 (!explicitUrl) {            String builtUrl = "jdbc:mysql://";            builtUrl = builtUrl + getServerName() + ":" + getPort() + "/"                + getDatabaseName();            return builtUrl;        } else {            return this.url;        }    }    /**     * Sets the user ID.     *     * @param userID the User ID     */    public void setUser(String userID) {        user = userID;    }    /**     * Returns the  configured user for this connection     *     * @return the user for this connection     */    public String getUser() {        return 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 (!explicitUrl) {            StringBuffer jdbcUrl = new StringBuffer("jdbc:mysql://");            if (hostName != null) {                jdbcUrl.append(hostName);            }            jdbcUrl.append(":");            jdbcUrl.append(port);            jdbcUrl.append("/");            if (databaseName != null) {                jdbcUrl.append(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视频| 奇米亚洲午夜久久精品| 粉嫩av亚洲一区二区图片| 精品久久久久久综合日本欧美| 久久成人18免费观看| 26uuu亚洲| 99久久99精品久久久久久 | 午夜精品久久久久久久久久久| 91麻豆自制传媒国产之光| 一区二区三区中文在线观看| 欧美日韩视频在线观看一区二区三区 | 欧美精品一区二区三区四区| 国产精品中文字幕一区二区三区| 国产欧美精品一区二区色综合朱莉| 床上的激情91.| 一区二区三区av电影| 日韩三级视频在线看| 成人午夜激情影院| 婷婷激情综合网| 国产亚洲成aⅴ人片在线观看| www.在线欧美| 日韩国产高清在线| 欧美激情一区二区三区| 欧美亚州韩日在线看免费版国语版| 美女视频一区在线观看| 国产精品国产三级国产aⅴ入口| 欧美中文一区二区三区| 精品一区二区三区蜜桃| 亚洲免费av观看| 欧美电视剧在线看免费| 色综合久久综合网97色综合| 久久9热精品视频| 一区二区久久久久久| 久久久精品天堂| 欧美午夜电影网| 国产98色在线|日韩| 五月天激情综合网| 国产精品毛片高清在线完整版| 欧美精品久久久久久久多人混战| 风间由美一区二区三区在线观看 | 一区在线观看视频| 欧美一级欧美三级| 色综合久久天天| 国产一区91精品张津瑜| 天天综合网 天天综合色| 国产免费成人在线视频| 91精品国产品国语在线不卡| 色婷婷综合久久久中文字幕| 韩国精品在线观看| 五月婷婷另类国产| 亚洲免费在线看| 欧美高清在线一区二区| 日韩精品一区二区三区蜜臀 | 免费美女久久99| 一区二区视频在线看| 国产精品污网站| 久久天天做天天爱综合色| 911精品产国品一二三产区| 色视频欧美一区二区三区| 国产二区国产一区在线观看| 蜜桃视频在线一区| 亚洲777理论| 亚洲综合激情另类小说区| 国产精品久久久久婷婷| 久久久精品国产免大香伊| 精品少妇一区二区三区| 日韩欧美中文一区| 宅男在线国产精品| 91精品国产全国免费观看| 欧美高清精品3d| 在线观看91av| 欧美一级片免费看| 日韩天堂在线观看| 日韩欧美高清dvd碟片| 日韩欧美国产麻豆| 精品福利二区三区| 欧美精品一区二区久久久| xnxx国产精品| 久久精品人人做人人综合| 久久久99精品免费观看| 国产亚洲欧洲997久久综合| 久久精品亚洲乱码伦伦中文| 久久精品综合网| 国产精品动漫网站| 亚洲精品一二三| 亚洲福利一区二区| 日韩精品电影在线| 精品一区二区三区日韩| 国产精品香蕉一区二区三区| 成人黄色软件下载| 91社区在线播放| 欧美日韩一区二区三区在线看| 4438x成人网最大色成网站| 欧美一区二区三区精品| 精品对白一区国产伦| 日本一区二区在线不卡| 中文字幕在线不卡| 亚洲一卡二卡三卡四卡无卡久久| 亚洲成人动漫在线免费观看| 日本成人在线电影网| 黑人巨大精品欧美黑白配亚洲| 成人视屏免费看| 91蜜桃传媒精品久久久一区二区| 在线一区二区视频| 日韩欧美国产电影| 国产精品久久久久桃色tv| 亚洲一级片在线观看| 精品一区二区成人精品| www.性欧美| 欧美精品日韩综合在线| 久久―日本道色综合久久| 亚洲天堂中文字幕| 久草在线在线精品观看| 99国产精品一区| 日韩女优视频免费观看| 亚洲欧美怡红院| 美女久久久精品| 日本韩国一区二区三区| 精品久久久久久久久久久久久久久 | 91精品国产福利在线观看| 久久精品亚洲国产奇米99| 亚洲一区二区三区小说| 国产精品99久久久久久久女警 | 欧美视频你懂的| xf在线a精品一区二区视频网站| 亚洲欧美日韩在线播放| 久久国产精品一区二区| 欧美做爰猛烈大尺度电影无法无天| 日韩欧美资源站| 亚洲曰韩产成在线| 成人性色生活片免费看爆迷你毛片| 欧美日韩电影一区| 亚洲欧美福利一区二区| 韩国女主播成人在线观看| 欧美日韩精品系列| 中文文精品字幕一区二区| 老司机精品视频一区二区三区| 色综合视频在线观看| 久久久久久久网| 久久99精品国产麻豆婷婷洗澡| 欧美视频一区在线| 日韩伦理免费电影| 国产成人精品一区二区三区四区 | 一本色道a无线码一区v| 久久这里只有精品视频网| 首页国产丝袜综合| 色噜噜狠狠成人网p站| 国产精品女上位| 国产精品1区二区.| 日韩欧美国产一区在线观看| 午夜a成v人精品| 欧美亚洲综合网| 一区二区三区四区av| 97se亚洲国产综合自在线不卡| 国产精品免费aⅴ片在线观看| 狠狠色丁香久久婷婷综合丁香| 欧美精品丝袜久久久中文字幕| 亚洲一区二区三区精品在线| 99re热视频这里只精品| 国产精品电影一区二区| av中文字幕在线不卡| 国产精品久久久久影视| 成人免费观看视频| 国产精品天美传媒| 成人永久aaa| 国产精品毛片无遮挡高清| 成人教育av在线| 亚洲人精品一区| 色国产综合视频| 尤物视频一区二区| 在线这里只有精品| 五月婷婷激情综合| 欧美一区二区女人| 国产裸体歌舞团一区二区| 久久人人爽人人爽| hitomi一区二区三区精品| 亚洲欧美电影一区二区| 在线视频欧美区| 天天色天天爱天天射综合| 日韩一级二级三级| 国产一二精品视频| 国产精品久99| 欧美性一级生活| 免费在线观看精品| 久久久精品人体av艺术| eeuss鲁一区二区三区| 亚洲综合清纯丝袜自拍| 欧美理论片在线| 欧美三级三级三级| 伦理电影国产精品| 国产喷白浆一区二区三区| 91在线视频免费91| 石原莉奈一区二区三区在线观看| 日韩欧美中文字幕一区| 粉嫩嫩av羞羞动漫久久久| 亚洲综合色成人| 精品不卡在线视频| 91一区二区在线观看| 日本大胆欧美人术艺术动态| 久久女同性恋中文字幕|