fr.paris.lutece.util.pool.service
Interface ConnectionService

All Known Implementing Classes:
C3p0ConnectionService, LuteceConnectionService, TomcatConnectionService

public interface ConnectionService

Database Connection Service Interface


Field Summary
static int INFO_NOT_AVAILABLE
           
 
Method Summary
 void freeConnection(java.sql.Connection conn)
          Release the connection
 java.sql.Connection getConnection()
          Get a connection
 int getCurrentConnections()
          Gets the number of opened connections
 org.apache.log4j.Logger getLogger()
          Gets the logger
 int getMaxConnections()
          Gets the max connections
 java.lang.String getPoolName()
          Gets the pool name
 java.lang.String getPoolProvider()
          Gets the pool manager provider
 void init(java.util.Hashtable<java.lang.String,java.lang.String> htParamsConnectionPool)
          Initialize pool parameters
 void release()
          Free all connections
 void setLogger(org.apache.log4j.Logger logger)
          Define the logger
 void setPoolName(java.lang.String strPoolName)
          Define the pool name
 

Field Detail

INFO_NOT_AVAILABLE

static final int INFO_NOT_AVAILABLE
See Also:
Constant Field Values
Method Detail

getConnection

java.sql.Connection getConnection()
Get a connection

Returns:
A database connection

freeConnection

void freeConnection(java.sql.Connection conn)
Release the connection

Parameters:
conn - The connection to release

release

void release()
Free all connections


init

void init(java.util.Hashtable<java.lang.String,java.lang.String> htParamsConnectionPool)
Initialize pool parameters

Parameters:
htParamsConnectionPool - Parameters

setPoolName

void setPoolName(java.lang.String strPoolName)
Define the pool name

Parameters:
strPoolName - The pool name

getPoolName

java.lang.String getPoolName()
Gets the pool name

Returns:
The pool name

setLogger

void setLogger(org.apache.log4j.Logger logger)
Define the logger

Parameters:
logger - The logger

getLogger

org.apache.log4j.Logger getLogger()
Gets the logger

Returns:
The logger

getCurrentConnections

int getCurrentConnections()
Gets the number of opened connections

Returns:
The current connections count

getMaxConnections

int getMaxConnections()
Gets the max connections

Returns:
The max connections count

getPoolProvider

java.lang.String getPoolProvider()
Gets the pool manager provider

Returns:
The pool manager


Copyright © 2009 Mairie de Paris. All Rights Reserved.