ru.biosoft.access
Class SqlConnectionPool
- public class SqlConnectionPool
Utility class for managemenet connections for SQL databases
through JDBC.
| Method Summary |
static Connection | getConnection(String driver, String url, String user, 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 Connection | getConnection(String url, String user, 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. |
getConnection
public static Connection getConnection(String driver, String url, String user, 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.
getConnection
public static Connection getConnection(String url, String user, 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.
to Class org.apache.log4j.Category
to Class java.util.HashMap
- Connection hash map.
Key - user@url, value - the connection.
BOTTOM