public final class AppConnectionService extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_POOL_NAME |
static String |
NO_POOL_DEFINED |
Modifier and Type | Method and Description |
---|---|
static void |
freeConnection(Connection conn)
Releases a connection and replaces it in the pool
|
static Connection |
getConnection()
Returns a connection to database from the pool name
|
static PluginConnectionService |
getDefaultConnectionService()
Returns a default Plugin Connection Service
|
static void |
getPoolList(ReferenceList list)
Gets the list of all pools defined in the db.properties file
|
static PoolManager |
getPoolManager()
Gets a reference on the current Pool Manager
|
static void |
init(String strConfigPath,
String strConfigFilename,
String strPoolName)
Initializes the connection pool and sets the pool manager instance
|
static void |
releasePool()
Releases all the connections on all the pools
|
public static final String NO_POOL_DEFINED
public static final String DEFAULT_POOL_NAME
public static void init(String strConfigPath, String strConfigFilename, String strPoolName) throws LuteceInitException
strConfigPath
- The relative Config pathstrConfigFilename
- The config file namestrPoolName
- The pool nameLuteceInitException
- If an error occuredpublic static Connection getConnection()
public static void freeConnection(Connection conn)
conn
- The connection to realeasepublic static void releasePool()
public static PoolManager getPoolManager()
public static void getPoolList(ReferenceList list)
list
- The Reference Listpublic static PluginConnectionService getDefaultConnectionService()
Copyright © 2020 City of Paris. All rights reserved.