|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.util.pool.PoolManager
public final class PoolManager
This class can manages a set of database connections pools. It's implemented as a singleton. It provides methods to get or release a connection from a given pool.
Method Summary | |
---|---|
void |
freeConnection(String strPoolName,
Connection con)
Returns a connection to pool. |
Connection |
getConnection(String strPoolName)
Returns an available connection from the pool. |
DataSource |
getDataSource(String strPoolName)
Returns the datasource for a given pool name |
static PoolManager |
getInstance(InputStream isDbProperties)
This method returns the unique instance of the PoolManager. |
Collection<ConnectionService> |
getPools()
Returns all pools available |
ReferenceList |
getPoolsInfos()
Returns pool's infos (currently opened connections) |
void |
release()
Releases all connections from all the pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PoolManager getInstance(InputStream isDbProperties) throws LuteceInitException
isDbProperties
- An InputStream on a db.properties File to initialiaze the pool if it's not already created.
LuteceInitException
- If any error occuredpublic Connection getConnection(String strPoolName)
strPoolName
- The pool name
public void freeConnection(String strPoolName, Connection con)
strPoolName
- Pool's namecon
- A released connectionpublic void release()
public Collection<ConnectionService> getPools()
public ReferenceList getPoolsInfos()
public DataSource getDataSource(String strPoolName)
strPoolName
- The Pool name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |