Class PluginConnectionService
- java.lang.Object
-
- fr.paris.lutece.portal.service.database.PluginConnectionService
-
public class PluginConnectionService extends java.lang.ObjectClass for Plugins connection services.
-
-
Constructor Summary
Constructors Constructor Description PluginConnectionService(java.lang.String strPoolName)Creates a new PluginConnectionService object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfreeConnection(java.sql.Connection conn)Releases a connection and replaces it in the pooljava.sql.ConnectiongetConnection()Returns a connection to database from the pool namejava.lang.StringgetPoolName()Gets the pool namevoidsetPool(java.lang.String strPoolName)Sets the pool to be used by this Connection Service
-
-
-
Method Detail
-
setPool
public final void setPool(java.lang.String strPoolName)
Sets the pool to be used by this Connection Service- Parameters:
strPoolName- The name of the pool
-
getConnection
public java.sql.Connection getConnection()
Returns a connection to database from the pool name- Returns:
- a connection to database from the pool
-
freeConnection
public void freeConnection(java.sql.Connection conn)
Releases a connection and replaces it in the pool- Parameters:
conn- The connection to realease
-
getPoolName
public java.lang.String getPoolName()
Gets the pool name- Returns:
- the pool name
-
-