|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ephman.abra.database.JDBCDatabaseSessionPool
Manage a pool of JDBCDatabaseSessions
Constructor Summary | |
JDBCDatabaseSessionPool(java.lang.String host,
java.lang.String database,
java.lang.String user,
java.lang.String password,
int count)
Create a pool of JDBCSessions. |
Method Summary | |
DatabaseSession |
get()
Get an available Database session |
static JDBCDatabaseSessionPool |
getInstance()
|
static JDBCDatabaseSessionPool |
getInstance(java.lang.String host,
java.lang.String database,
java.lang.String user,
java.lang.String password,
int count)
Retrieve the session pool instance. |
void |
put(DatabaseSession session)
Return a session to the pool |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JDBCDatabaseSessionPool(java.lang.String host, java.lang.String database, java.lang.String user, java.lang.String password, int count) throws java.sql.SQLException
host
- host name for the database serverdatabase
- name of the database to which we are connectinguser
- user id for database connectionpassword
- password for database connectioncount
- maximum number of database connections in this poolMethod Detail |
public static JDBCDatabaseSessionPool getInstance(java.lang.String host, java.lang.String database, java.lang.String user, java.lang.String password, int count) throws java.sql.SQLException
java.sql.SQLException
public static JDBCDatabaseSessionPool getInstance() throws java.sql.SQLException
java.sql.SQLException
public DatabaseSession get()
get
in interface DatabaseSessionPool
public void put(DatabaseSession session) throws java.lang.Exception
put
in interface DatabaseSessionPool
session
- session returned to the pool
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |