|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.pool.BaseObjectPool
org.apache.commons.pool.impl.GenericObjectPool
com.ca.jcs.cfg.GenericObjectPoolConnectionManager
public abstract class GenericObjectPoolConnectionManager
Simple adapter that delegates methods from connection manager to obvious
matching methods on a pool. Note that the provided factory must pay very careful
attention to distinguishing retriable soft failures from hard failures if resiliency
is to be supported (refer to comments on ConnectionManager.borrowConnection()).
GenericObjectPoolConfigBeanWrapper| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.commons.pool.impl.GenericObjectPool |
|---|
GenericObjectPool.Config |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
GenericObjectPoolConnectionManager(PoolableObjectFactory factory,
GenericObjectPool.Config config,
Logger connLog)
|
|
GenericObjectPoolConnectionManager(PoolableObjectFactory factory,
Logger log)
|
|
| Method Summary | |
|---|---|
void |
activate()
Derived classes should override if need to perform some logic after construction is complete, does nothing in this class. |
Object |
borrowConnection()
Delegates to GenericObjectPool.borrowObject(), but not comments about soft failures in
comments for this class. |
void |
clearConnection()
This method can be called to clear all existing connections in the pool when one is found to be in a in stale or inconsistent state. |
void |
deactivate()
Derived classes should override if need to perform some logic when closing down the pool, just closes pool in this class. |
Logger |
getConnectorLogger()
|
PoolableObjectFactory |
getFactory()
For some reason this method isn't implemented in super class, so implement it here. |
void |
returnConnection(Object conn)
|
void |
setFactory(PoolableObjectFactory factory)
|
| Methods inherited from class org.apache.commons.pool.BaseObjectPool |
|---|
assertOpen, isClosed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericObjectPoolConnectionManager(PoolableObjectFactory factory,
GenericObjectPool.Config config,
Logger connLog)
public GenericObjectPoolConnectionManager(PoolableObjectFactory factory,
Logger log)
| Method Detail |
|---|
public PoolableObjectFactory getFactory()
public Logger getConnectorLogger()
public void setFactory(PoolableObjectFactory factory)
throws IllegalStateException
setFactory in interface ObjectPoolsetFactory in class GenericObjectPoolIllegalStateException
public Object borrowConnection()
throws NamingException
GenericObjectPool.borrowObject(), but not comments about soft failures in
comments for this class.
borrowConnection in interface ConnectionManagerNamingException - If connection can't be borrowed, can't return null.public void returnConnection(Object conn)
returnConnection in interface ConnectionManager
public void activate()
throws NamingException
activate in interface ActivatableNamingException
public void deactivate()
throws NamingException
deactivate in interface ActivatableNamingException
public void clearConnection()
throws NamingException
ConnectionManager
clearConnection in interface ConnectionManagerNamingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||