Package org.springframework.jdbc

Examples of org.springframework.jdbc.CannotGetJdbcConnectionException


        boolean transactionAware = (dataSource instanceof TransactionAwareDataSourceProxy);
        Connection conn;
        try {
            conn = transactionAware ? dataSource.getConnection() : DataSourceUtils.getConnection(dataSource);
        } catch (SQLException e) {
            throw new CannotGetJdbcConnectionException("Could not get JDBC Connection for SqlSession", e);
        }

        if (logger.isDebugEnabled()) {
            logger.debug("Creating SqlSession with JDBC Connection [" + conn + "]");
        }
View Full Code Here


  public static Connection getConnection(DataSource dataSource) throws CannotGetJdbcConnectionException {
    try {
      return doGetConnection(dataSource);
    }
    catch (SQLException ex) {
      throw new CannotGetJdbcConnectionException("Could not get JDBC Connection", ex);
    }
  }
View Full Code Here

          Thread.sleep(this.interval * 1000);
        }
      }

      if (!validated) {
        throw new CannotGetJdbcConnectionException(
            "Database has not started up within " + this.timeout + " seconds", latestEx);
      }

      float duration = (System.currentTimeMillis() - beginTime) / 1000;
      if (logger.isInfoEnabled()) {
View Full Code Here

  public static Connection getConnection(DataSource dataSource) throws CannotGetJdbcConnectionException {
    try {
      return doGetConnection(dataSource);
    }
    catch (SQLException ex) {
      throw new CannotGetJdbcConnectionException("Could not get JDBC Connection", ex);
    }
  }
View Full Code Here

  public static Connection getConnection(DataSource dataSource) throws CannotGetJdbcConnectionException {
    try {
      return doGetConnection(dataSource);
    }
    catch (SQLException ex) {
      throw new CannotGetJdbcConnectionException("Could not get JDBC Connection", ex);
    }
  }
View Full Code Here

      if (logger.isInfoEnabled()) {
        logger.info("Database startup detected after " + duration + " seconds");
      }
    }
    else {
      throw new CannotGetJdbcConnectionException(
          "Database has not started up within " + this.timeout + " seconds", latestEx);
    }
  }
View Full Code Here

    this.driverClassName = driverClassName.trim();
    try {
      Class.forName(this.driverClassName, true, ClassUtils.getDefaultClassLoader());
    }
    catch (ClassNotFoundException ex) {
      throw new CannotGetJdbcConnectionException(
          "Could not load JDBC driver class [" + this.driverClassName + "]", ex);
    }
    if (logger.isInfoEnabled()) {
      logger.info("Loaded JDBC driver: " + this.driverClassName);
    }
View Full Code Here

            logger.debug("Reusing JDBC Connection [" + ibatisCon + "] for iBATIS operation");
          }
        }
      }
      catch (SQLException ex) {
        throw new CannotGetJdbcConnectionException("Could not get JDBC Connection", ex);
      }

      // Execute given callback...
      try {
        return action.doInSqlMapClient(session);
View Full Code Here

    proxied.setAge(26);
    assertEquals(2, cca.getCalls());
    assertEquals(26, proxied.getAge());
    assertEquals(4, cca.getCalls());
    try {
      proxied.exceptional(new CannotGetJdbcConnectionException("foo", (SQLException)null));
      fail("Should have thrown CannotGetJdbcConnectionException");
    }
    catch (CannotGetJdbcConnectionException ex) {
      // expected
    }
View Full Code Here

          Thread.sleep(this.interval * 1000);
        }
      }

      if (!validated) {
        throw new CannotGetJdbcConnectionException(
            "Database has not started up within " + this.timeout + " seconds", latestEx);
      }

      float duration = (System.currentTimeMillis() - beginTime) / 1000;
      if (logger.isInfoEnabled()) {
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.CannotGetJdbcConnectionException

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.