public class ConnectionPool extends FrameworkBase
active, initMessage, inProcess, jvmService, running, serviceData, totalErrors, totalMessages, totalProcessedCATEGROY_ADAPTER, CATEGROY_APP, CATEGROY_DB_CON, CATEGROY_DB_POOL, CATEGROY_ENGINE, CATEGROY_MODULE, CATEGROY_POOL_MGR, CATEGROY_QUEUE, CATEGROY_THREAD_MGR, CATEGROY_WORKER, COMMAND_DEREGISTER_KEY, COMMAND_PAUSE, COMMAND_REGISTER_KEY, COMMAND_RESTART, COMMAND_SHUTDOWN, COMMAND_START, COMMAND_STOP, FLAG_FALSE, FLAG_TRUE, PARAM_JVM_STR, PARAM_JVMID_STR, PARAM_SERVERNAME_STR, PARAM_SERVICEACTIVE_STR, PARAM_SERVICECATAGORY_STR, PARAM_SERVICENAME_STR, PARAM_SERVICERUNNING_STR, TYPE_CLUSTER, TYPE_DISPLAY_STR, TYPE_EVENT, TYPE_JVM, TYPE_JVM_STR, TYPE_MAX, TYPE_SERVER, TYPE_SERVICE| Constructor and Description |
|---|
ConnectionPool(DBAccess aDBAccess,
String aPoolName,
String anUrl,
String anUser,
String aPassword,
int aMinPool,
int aMaxPool,
boolean aReadOnly) |
ConnectionPool(String aPoolName,
ConnectionQueue aQueue)
Constructor - Creates new connection Pool
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnections()
Will remove a connection from the pool
???? must add List for active sessions
|
JDCConnection |
getConnection()
Will return the next available connection from the pool, If none
are available an max not reached then a new connection is created
|
ConnectionQueue |
getConnectionQueue() |
List<Object> |
getPooledServiceData() |
String |
getPoolName()
Returns the pool Name
|
int |
getPoolSize() |
String |
getUserIdx()
returns the user id
|
void |
reapConnections()
Will remove any bad connection
Still missing: Check for bad process tying up a connection forever.
|
void |
removeConnection(JDCConnection conn) |
void |
returnConnection(JDCConnection conn)
Will return a connection back to the pool
|
void |
setConnectionQueue(ConnectionQueue aConnectionQueue) |
addInProcess, addTotalErrorNumber, addTotalMsgNumber, addTotalProcessed, deRegister, deRegister, doEventMessage, doMessage, getDefError, getInProcess, getJvmId, getJvmService, getName, getService, getServiceData, getServiceName, getStats, getTotalErrorNumber, getTotalMsgNumber, getTotalProcessed, initMessage, isActive, isRunning, register, register, resetTotals, setActive, setRunning, setServiceData, subtractInProcesspublic ConnectionPool(String aPoolName, ConnectionQueue aQueue)
aPoolName - String Pool NameaQueue - Queuepublic ConnectionPool(DBAccess aDBAccess, String aPoolName, String anUrl, String anUser, String aPassword, int aMinPool, int aMaxPool, boolean aReadOnly) throws SQLException
SQLExceptionpublic String getPoolName()
public ConnectionQueue getConnectionQueue()
public void setConnectionQueue(ConnectionQueue aConnectionQueue)
public String getUserIdx()
public void reapConnections()
public void closeConnections()
public void removeConnection(JDCConnection conn)
public JDCConnection getConnection() throws SQLException
SQLException - sqlpublic int getPoolSize()
public void returnConnection(JDCConnection conn)
conn - JDCConnection DB ConnectionCopyright © 2020. All rights reserved.