Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ru.biosoft.access
Class SqlConnectionPool

    java.lang.Object
      ru.biosoft.access.SqlConnectionPool

public class SqlConnectionPool
extends java.lang.Object

Utility class for managemenet connections for SQL databases through JDBC.

Constructor Summary
`SqlConnectionPool()`

Method Summary
`static java.sql.Connection` | `getConnection(java.lang.String url, java.lang.String user, java.lang.String password)` Checks in hash whether the connection for the specified url and user is already created and returns it, otherwise creates new connection, put it in hash and returns it.
`static java.sql.Connection` | `getConnection(java.lang.String driver, java.lang.String url, java.lang.String user, java.lang.String password)` Checks in hash whether the connection for the specified url and user is already created and returns it, otherwise creates new connection, put it in hash and returns it.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SqlConnectionPool

    public SqlConnectionPool()

Method Detail

### getConnection

    public static java.sql.Connection getConnection(java.lang.String driver,
                                                    java.lang.String url,
                                                    java.lang.String user,
                                                    java.lang.String password)
                                             throws java.lang.ClassNotFoundException,
                                                    java.sql.SQLException

  Checks in hash whether the connection for the specified url and user is already created and returns it, otherwise creates new connection, put it in hash and returns it.

  Parameters:
    `driver` - - DB driver class name
    `url` - - URL for database connection
    `user` - - user for database connection
    `password` - - password for database connection.
  Throws:
    `java.lang.ClassNotFoundException`
    `java.sql.SQLException`

### getConnection

    public static java.sql.Connection getConnection(java.lang.String url,
                                                    java.lang.String user,
                                                    java.lang.String password)
                                             throws java.sql.SQLException

  Checks in hash whether the connection for the specified url and user is already created and returns it, otherwise creates new connection, put it in hash and returns it.

  Parameters:
    `url` - - URL for database connection
    `user` - - user for database connection
    `password` - - password for database connection.
  Throws:
    `java.sql.SQLException`

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.