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.
|
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 |
SqlConnectionPool
public SqlConnectionPool()
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 nameurl - - URL for database connectionuser - - user for database connectionpassword - - 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 connectionuser - - user for database connectionpassword - - password for database connection.
- Throws:
java.sql.SQLException
Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.