public final class TaggedConnectionPoolManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TaggedConnectionPoolManager.ConfigurationException
Exception thrown when validation of pool configuration parameters fails.
|
static class |
TaggedConnectionPoolManager.PoolInfo |
static class |
TaggedConnectionPoolManager.ReconfigurationException
Exception thrown when an invalid parameter has been passed to reconfigure.
|
Modifier and Type | Method and Description |
---|---|
static void |
flushPool()
Close all database connections without aborting ongoing transactions and cursors.
|
TaggedConnectionPoolConfig |
getConfig()
Gets the currently used pool configuration.
|
TaggedConnection |
getConnection(java.lang.String clientSessionId,
java.lang.String fndUserId,
java.lang.String initKey,
java.lang.String clientId)
Gets a connection from the connection pool.
|
int |
getFreePoolSize()
Gets the current number of connections in the free connection pool.
|
static TaggedConnectionPoolManager |
getInstance()
Gets the singleton instance of the connection pool manager.
|
int |
getPoolSize()
Gets the current number of connections in the connection pool.
|
java.lang.String |
getPoolState()
Gets the current state of the pool.
|
int |
getRegisterSize()
Gets the total number of existing tagged connections.
|
int |
getReservedPoolSize()
Gets the current number of connections in the reserved connection pool.
|
TaggedConnectionStatistics |
getTaggedConnectionStatistics()
Gets statistics gathered from existing and non-existing (destroyed) tagged connections.
|
int |
getUsedPoolSize()
Gets the number of tagged connections currently used by client requests.
|
void |
incRequestFailureCount() |
boolean |
isTestMode()
Checks if the test mode is on.
|
java.util.ArrayList<DatabaseSessionSnapshot> |
listDatabaseSessions()
Gets a snapshot of the connection pool.
|
void |
reconfigure(TaggedConnectionPoolConfig cfg)
Reconfigures some connection pool parameters without restarting the pool itself.
|
static void |
refreshSessionRoles()
Mark all connections in the pool for refreshing of active roles.
|
void |
restart(TaggedConnectionPoolConfig newConfig)
Restarts the connection pool using new configuration parameters.
|
void |
returnConnection(TaggedConnection x)
Returns a connection to the pool after a request.
|
void |
setTestMode()
Turns the test mode on.
|
static void |
shutdown()
Shuts down the connection pool and its background threads.
|
void |
spoolPoolStatistics()
Spools the current state of the pool and statistic data to log output.
|
static void |
start()
Starts up the connection pool and the background threads used for maintenance of the pool.
|
boolean |
useProxySessions()
Checks if Oracle Proxy Authentication mode is turned on.
|
public static TaggedConnectionPoolManager getInstance() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if the connection pool has not been initializedpublic void setTestMode()
public boolean isTestMode()
public TaggedConnectionPoolConfig getConfig()
public static void start() throws java.sql.SQLException, TaggedConnectionPoolManager.ConfigurationException
java.sql.SQLException
TaggedConnectionPoolManager.ConfigurationException
public static void shutdown()
public void restart(TaggedConnectionPoolConfig newConfig) throws java.sql.SQLException, TaggedConnectionPoolManager.ConfigurationException
newConfig
- an instance representing new configuration parametersTaggedConnectionPoolManager.ConfigurationException
- if validation of the new configuration parameters failsjava.sql.SQLException
- if restart of the pool failspublic void reconfigure(TaggedConnectionPoolConfig cfg) throws TaggedConnectionPoolManager.ConfigurationException, TaggedConnectionPoolManager.ReconfigurationException
cfg
- an instance containing parameters to be modifiedTaggedConnectionPoolManager.ReconfigurationException
- if an invalid parameter, or a parameter requiring restart of the pool, has been specifiedTaggedConnectionPoolManager.ConfigurationException
- if validation of the new configuration parameters failspublic static void flushPool()
public static void refreshSessionRoles()
public TaggedConnection getConnection(java.lang.String clientSessionId, java.lang.String fndUserId, java.lang.String initKey, java.lang.String clientId) throws java.sql.SQLException
clientSessionId
- client session ID or null if an anonymous connection is requiredfndUserId
- FND user identity, or null if not knowninitKey
- current value of serialized in-parameters to PLSQL initialization procedure (Proxy_Login_SYS.Init_Session_)clientId
- client identifier, or null if not knownjava.sql.SQLException
public void returnConnection(TaggedConnection x)
x
- tagged connectionpublic int getPoolSize()
public int getRegisterSize()
public int getFreePoolSize()
public int getReservedPoolSize()
public int getUsedPoolSize()
public boolean useProxySessions()
public void incRequestFailureCount()
public java.util.ArrayList<DatabaseSessionSnapshot> listDatabaseSessions()
public java.lang.String getPoolState()
public void spoolPoolStatistics()
public TaggedConnectionStatistics getTaggedConnectionStatistics()