Examples of CreateConnectionFailureException


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

                throw new TransactionException("getConnection() failed: no started transaction.");
            }

            conn = ts.getConnection();

            if (conn == null) throw new CreateConnectionFailureException("getConnection() failed to create a connection.");
        }
        catch(CreateConnectionFailureException ccfex) {
            throw new BaseSQLException(ccfex);
        }
        catch(Exception ex) {
View Full Code Here

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

                throw new TransactionException("getConnection() failed: no started transaction.");
            }

            conn = ts.getConnection(connectionName);

            if (conn == null) throw new CreateConnectionFailureException("getConnection() failed to create a connection.");
        }
        catch(CreateConnectionFailureException ccfex) {
            throw new BaseSQLException(ccfex);
        }
        catch(Exception ex) {
View Full Code Here

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

                throw new TransactionException("getConnection() failed: no started transaction.");
            }

            conn = ts.getConnection(dcc);

            if (conn == null) throw new CreateConnectionFailureException("getConnection() failed to create a connection.");
        }
        catch(CreateConnectionFailureException ccfex) {
            throw new BaseSQLException(ccfex);
        }
        catch(Exception ex) {
View Full Code Here

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

   * @exception CreateConnectionFailureException
   */
  public static Connection createConnection(DataSourceConnectionContext dcc)
      throws CreateConnectionFailureException {
    if (dcc == null)
      throw new CreateConnectionFailureException(
          "createConnection failure: dcc is null.");

    beforeConnection(dcc);

    Connection connection = null;
   
    if (dcc.useLoginForConnection()) {
      connection = createConnection(dcc.getDataSourceName(),
          loginUsername(), loginPassword(), dcc.getLoginTimeout());
    }
    else {
      if (dcc.getUsername() == null) {
        connection = createConnection(dcc.getDataSourceName(), dcc
            .getLoginTimeout());
      } else {
        connection = createConnection(dcc.getDataSourceName(), dcc
            .getUsername(), dcc.getPassword(), dcc.getLoginTimeout());
      }
    }

    if (connection == null)
      throw new CreateConnectionFailureException(
          "createConnection() failed for connection name: "
              + dcc.getConnectionName());

    checkReadonly(connection, dcc);
    checkAutoCommit(connection, dcc);
View Full Code Here

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

      connection = ds.getConnection();
    } catch (Exception ex) {
            String errorMessage = "ConnectionUtil.createConnection " +
                    "failed for dataSourceName \"" + jndiDataSourceName + "\"";
      throw new CreateConnectionFailureException(errorMessage +
                    " because "  + ex.getMessage(), ex);
    }

    return connection;
  }
View Full Code Here

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

      connection = ds.getConnection(username, password);
    } catch (Exception ex) {
            String errorMessage = "ConnectionUtil.createConnection " +
                    "failed for dataSourceName \"" + jndiDataSourceName +
                    "\"  and user \"" + username + "\"";
      throw new CreateConnectionFailureException(errorMessage
          + " because " + ex.getMessage(), ex);
    }
   
    return connection;
  }
View Full Code Here

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

   * @return Connection
   * @exception CreateConnectionFailureException
   */
  public static Connection createConnection(JdbcConnectionContext dcc) {
    if (dcc == null)
      throw new CreateConnectionFailureException(
          "createConnection failure: dcc is null.");

    beforeConnection(dcc);

    Connection connection = null;

    if (dcc.useLoginForConnection()) {
      connection = createConnection(dcc.getDriverClassName(), dcc.getUrl(),
          loginUsername(), loginPassword(), dcc.getLoginTimeout());
    }
    else {
      if (dcc.getUsername() == null) {
        connection = createConnection(dcc.getDriverClassName(), dcc
            .getUrl(), dcc.getLoginTimeout());
      } else {
        connection = createConnection(dcc.getDriverClassName(), dcc
            .getUrl(), dcc.getUsername(), dcc.getPassword(), dcc
            .getLoginTimeout());
      }
    }

    if (connection == null)
      throw new CreateConnectionFailureException(
          "createConnection() failed for connection name: "
              + dcc.getConnectionName());

    checkReadonly(connection, dcc);
    checkAutoCommit(connection, dcc);
View Full Code Here

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

      if (loginTimeout != null)
        DriverManager.setLoginTimeout(loginTimeout.intValue());

      connection = DriverManager.getConnection(url);
    } catch (Exception ex) {
      throw new CreateConnectionFailureException(
          "ConnectionUtil.createConnection failed for url \"" + url
              + "\" because " + ex.getMessage(), ex);
    }

    return connection;
View Full Code Here

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

      if (loginTimeout != null)
        DriverManager.setLoginTimeout(loginTimeout.intValue());

      connection = DriverManager.getConnection(url, username, password);
    } catch (Exception ex) {
      throw new CreateConnectionFailureException(
          "ConnectionUtil.createConnection failed for url \"" + url
              + "\" and user \"" + username + "\" because "
              + ex.getMessage(), ex);
    }
View Full Code Here

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

   * @return Connection
   * @exception CreateConnectionFailureException
   */
  public static Connection createPooledConnection(JdbcConnectionContext dcc) {
    if (dcc == null)
      throw new CreateConnectionFailureException(
          "createPooledConnection failure: dcc is null.");

    beforeConnection(dcc);

    Connection connection = null;

    if (dcc.useLoginForConnection()) {
      connection = createPooledConnection(dcc.getConnectionName(),
                loginUsername(), loginPassword(), dcc.getLoginTimeout());
    }
    else {
      if (dcc.getUsername() == null) {
        connection = createPooledConnection(dcc.getConnectionName(), dcc.getLoginTimeout());
      } else {
        connection = createPooledConnection(dcc.getConnectionName(),
              dcc.getUsername(), dcc.getPassword(), dcc.getLoginTimeout());
      }
    }

    if (connection == null)
      throw new CreateConnectionFailureException(
          "createPooledConnection() failed for connection name: "
              + dcc.getConnectionName());

    checkReadonly(connection, dcc);
    checkAutoCommit(connection, dcc);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.