Package org.apache.airavata.common.utils

Examples of org.apache.airavata.common.utils.DBUtil



        String jdbcUrl = getJDBCUrl(host, port, userName, password);

        // Create the dbutil class
        dbUtil = new DBUtil(jdbcUrl,
                userName,
                password,
                driver);

        if (!databaseStarted) {
View Full Code Here


                .append("/persistent_data;create=true;user=").append(user).append(";password=")
                .append(password).toString();
    }

    private static void waitTillServerStarts(String jdbcUrl, String userName, String password, String driver) {
        DBUtil dbUtil = null;

        try {
            dbUtil = new DBUtil(jdbcUrl, userName, password, driver);
        } catch (Exception e) {
            // ignore
        }

        Connection connection = null;
        try {
            if (dbUtil != null) {
                connection = dbUtil.getConnection();
            }
        } catch (Throwable e) {
            // ignore
        }

        while (connection == null) {
            try {
                Thread.sleep(1000);
                try {
                    if (dbUtil != null) {
                        connection = dbUtil.getConnection();
                    }
                } catch (SQLException e) {
                    // ignore
                }
            } catch (InterruptedException e) {
View Full Code Here

TOP

Related Classes of org.apache.airavata.common.utils.DBUtil

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.