/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  org.apache.log4j.Logger
 */
package com.hst.common.util;

import com.hst.common.util.DBUtil;
import java.sql.Connection;
import java.sql.DriverManager;
import org.apache.log4j.Logger;

public class OracleUtil
extends DBUtil {
    private static Logger log = Logger.getLogger(OracleUtil.class);

    public static Connection getConnection(String url, String sid, String port, String username, String password) throws Exception {
        String driverName = "oracle.jdbc.driver.OracleDriver";
        String dbURL = "jdbc:oracle:thin:@" + url + ":" + port + ":" + sid;
        Connection conn = null;
        try {
            OracleUtil.loadDriver(driverName);
            conn = DriverManager.getConnection(dbURL, username, password);
        }
        catch (Exception e) {
            log.error((Object)("\u83b7\u53d6\u8fde\u63a5\u4fe1\u606f\uff1aurl=" + url + ";username=" + username + ";password=" + password));
            log.error((Object)"OracleUtil\u83b7\u53d6\u8fde\u63a5\u62a5\u9519", (Throwable)e);
            throw e;
        }
        return conn;
    }
}
