Package com.scooterframework.orm.sqldataexpress.exception

Examples of com.scooterframework.orm.sqldataexpress.exception.CreateConnectionFailureException


        boolean isDataSource = false;
        String dataSourceName = prop.getProperty(DatabaseConnectionContext.KEY_DATASOURCENAME);
        String url = prop.getProperty(DatabaseConnectionContext.KEY_URL);
        if (dataSourceName != null && !dataSourceName.equals("")) {
            if (url != null && !url.equals(""))
                throw new CreateConnectionFailureException("Failed to detect whether " +
                    "the connection properties is for Jdbc connection or for datasource connection: url=" + url +
                    " datasource=" + dataSourceName);
            isDataSource = true;
        }
        else {
            if (url == null || url.equals(""))
                throw new CreateConnectionFailureException("Failed to detect whether " +
                    "the connection properties is for Jdbc connection or for datasource connection: " +
                    "both url and dataSourceName are either null or empty.");
        }
       
        return isDataSource;
View Full Code Here


     */
    protected Connection createConnection() {
        Connection connection = ConnectionUtil.createConnection((DataSourceConnectionContext)getDatabaseConnectionContext());
       
        if (connection == null)
            throw new CreateConnectionFailureException( "DataSourceConnection:createConnection() failure.");
       
        return connection;
    }
View Full Code Here

        else {
            connection = ConnectionUtil.createConnection(jdcc);
        }
       
        if (connection == null)
            throw new CreateConnectionFailureException( "JdbcConnection:createConnection() failure for " + getConnectionName() + ".");
       
        return connection;
    }
View Full Code Here

TOP

Related Classes of com.scooterframework.orm.sqldataexpress.exception.CreateConnectionFailureException

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.