Package com.volantis.mcs.repository.jdbc

Examples of com.volantis.mcs.repository.jdbc.JDBCRepositoryException


    protected static JDBCDriverVendor getVendor(Map properties)
            throws RepositoryException {

        String vendor = (String) properties.get(VENDOR_PROPERTY);
        if (vendor == null || vendor.length() == 0) {
            throw new JDBCRepositoryException(
                    EXCEPTION_LOCALIZER.format("jdbc-missing-vendor"));
        }

        JDBCRepositoryType type = JDBCRepositoryType.getTypeForVendor(vendor);
        if (type == null) {
            throw new JDBCRepositoryException(EXCEPTION_LOCALIZER.format(
                    "jdbc-unknown-vendor", vendor));
        }

        return type.getVendor();
    }
View Full Code Here


        // Get the maximum number of connections allowed.
        try {
            maxConnections =
                    getInt(properties, POOL_MAX_CONNECTIONS_PROPERTY, 10);
        } catch (NumberFormatException nfe) {
            throw new JDBCRepositoryException(EXCEPTION_LOCALIZER.format(
                    "jdbc-pool-invalid-max-connections"));
        }

        // Get the maximum number of free connections allowed.
        try {
            maxFreeConnections = getInt(properties,
                    POOL_MAX_FREE_CONNECTIONS_PROPERTY,
                    8);
        } catch (NumberFormatException nfe) {
            throw new JDBCRepositoryException(EXCEPTION_LOCALIZER.format(
                    "jdbc-pool-invalid-maxFree-connections"));
        }

        // Get the minimum number of free connections allowed.
        try {
            minFreeConnections = getInt(properties,
                    POOL_MIN_FREE_CONNECTIONS_PROPERTY,
                    2);
        } catch (NumberFormatException nfe) {
            throw new JDBCRepositoryException(EXCEPTION_LOCALIZER.format(
                    "jdbc-pool-invalid-minFree-connections"));
        }

        // Get the initial number of free connections created.
        try {
            initialConnections = getInt(properties,
                    POOL_INITIAL_CONNECTIONS_PROPERTY,
                    minFreeConnections);
        } catch (NumberFormatException nfe) {
            throw new JDBCRepositoryException(EXCEPTION_LOCALIZER.format(
                    "jdbc-pool-invalid-initial-connections"));
        }

        boolean keepConnectionsAlive = getKeepConnectionsAlive(properties);
        int connectionPollInterval = getConnectionPollInterval(properties);
View Full Code Here

          stmt.close ();
        }
      }
      catch (SQLException e) {
        logger.error("sql-exception", e);
        throw new JDBCRepositoryException (e);
      }
      throw new JDBCRepositoryException (sqle);
    }
  }
View Full Code Here

        pstmt.close ();
        pstmt = null;
      }
    } catch (SQLException sqle) {
      logger.error("sql-exception", sqle);
      throw new JDBCRepositoryException(sqle);
    } finally {
      if (pstmt != null) {
        try {
          pstmt.close();
        } catch (SQLException e) {
          logger.error("sql-exception", e);
          throw new JDBCRepositoryException(e);
        }
      }
    }
  }
View Full Code Here

      stmt.close();
      stmt = sqlConnection.createStatement();
      stmt.executeUpdate(sql);
    } catch (SQLException sqle) {
      logger.error("sql-exception", sqle);
      throw new JDBCRepositoryException(sqle);
    } finally {
      close(stmt);
    }
  }
View Full Code Here

      device.setTACValues(tacs);

      return device;
    } catch (SQLException sqle) {
      logger.error("sql-exception", sqle);
      throw new JDBCRepositoryException(sqle);
    } finally {
      close(stmt);
    }
  }
View Full Code Here

      stmt.close ();
    }
    catch (SQLException sqle) {
      logger.error("sql-exception", sqle);
      throw new JDBCRepositoryException(sqle);
    }
    finally {
      close(stmt);
    }
  }
View Full Code Here

      return e;
    }
    catch (SQLException sqle) {
      logger.error("sql-exception", sqle);
      throw new JDBCRepositoryException (sqle);
    }
    finally {
        close(stmt);
    }
  }
View Full Code Here

      return e;
    }
    catch (SQLException sqle) {
      logger.error("sql-exception", sqle);
      throw new JDBCRepositoryException (sqle);
    }
    finally {
        close(stmt);
    }
  }
View Full Code Here

        stmt.executeUpdate(sql);
    }
    catch (SQLException sqle) {
      logger.error("sql-exception", sqle);
      throw new JDBCRepositoryException(sqle);
    }
    finally {
        close(stmt);
    }
  }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.repository.jdbc.JDBCRepositoryException

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.