|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.csc.phynixx.connection.PhynixxManagedConnectionListenerAdapter<C>
org.csc.phynixx.connection.PhynixxManagedConnectionFactory<C>
org.csc.phynixx.connection.PooledPhynixxManagedConnectionFactory<C>
C
- Typ of the pure connectionpublic class PooledPhynixxManagedConnectionFactory<C extends IPhynixxConnection>
Factory pools the pure connection. before delivering the connection it ist decorate by the according to PhynixxManagedConnectionFactory
.
Constructor Summary | |
---|---|
PooledPhynixxManagedConnectionFactory()
|
|
PooledPhynixxManagedConnectionFactory(IPhynixxConnectionFactory connectionFactory)
|
|
PooledPhynixxManagedConnectionFactory(IPhynixxConnectionFactory<C> connectionFactory,
org.apache.commons.pool2.impl.GenericObjectPoolConfig genericPoolConfig)
|
Method Summary | |
---|---|
void |
close()
closes all currently opened connections |
void |
connectionFreed(IManagedConnectionEvent<C> event)
the connection is set free an released from the pool |
void |
connectionReleased(IManagedConnectionEvent<C> event)
the connection is sent back to the pool |
void |
freeConnection(IPhynixxManagedConnection<C> connection)
|
Class<C> |
getConnectionInterface()
|
IPhynixxManagedConnection<C> |
getManagedConnection()
the returned connection has to be explicitly closed |
void |
releaseConnection(IPhynixxManagedConnection<C> connection)
closes the connection an releases it to the pool |
void |
setGenericPoolConfig(org.apache.commons.pool2.impl.GenericObjectPoolConfig cfg)
closes the current pool -if existing- and instanciates a new pool |
Methods inherited from class org.csc.phynixx.connection.PhynixxManagedConnectionFactory |
---|
addManagedConnectionDecorator, getConnection, getConnectionFactory, getLoggerSystemStrategy, getManagedConnectionDecorators, instantiateConnection, isAutocommitAware, isSynchronizeConnection, setAutocommitAware, setConnectionFactory, setLoggerSystemStrategy, setSynchronizeConnection |
Methods inherited from class org.csc.phynixx.connection.PhynixxManagedConnectionListenerAdapter |
---|
connectionCommitted, connectionCommitting, connectionErrorOccurred, connectionPrepared, connectionPreparing, connectionRecovered, connectionRecovering, connectionRequiresTransaction, connectionRequiresTransactionExecuted, connectionReset, connectionRolledback, connectionRollingBack |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.csc.phynixx.connection.IPhynixxManagedConnectionListener |
---|
connectionCommitted, connectionCommitting, connectionErrorOccurred, connectionPrepared, connectionPreparing, connectionRecovered, connectionRecovering, connectionRequiresTransaction, connectionRequiresTransactionExecuted, connectionReset, connectionRolledback, connectionRollingBack |
Constructor Detail |
---|
public PooledPhynixxManagedConnectionFactory()
public PooledPhynixxManagedConnectionFactory(IPhynixxConnectionFactory connectionFactory)
public PooledPhynixxManagedConnectionFactory(IPhynixxConnectionFactory<C> connectionFactory, org.apache.commons.pool2.impl.GenericObjectPoolConfig genericPoolConfig)
Method Detail |
---|
public void setGenericPoolConfig(org.apache.commons.pool2.impl.GenericObjectPoolConfig cfg) throws Exception
cfg
-
Exception
public IPhynixxManagedConnection<C> getManagedConnection()
IPhynixxManagedConnectionFactory
getManagedConnection
in interface IPhynixxManagedConnectionFactory<C extends IPhynixxConnection>
getManagedConnection
in class PhynixxManagedConnectionFactory<C extends IPhynixxConnection>
public void releaseConnection(IPhynixxManagedConnection<C> connection)
connection
- public void freeConnection(IPhynixxManagedConnection<C> connection)
public void close()
IPhynixxManagedConnectionFactory
close
in interface IPhynixxConnectionFactory<C extends IPhynixxConnection>
close
in interface IPhynixxManagedConnectionFactory<C extends IPhynixxConnection>
close
in class PhynixxManagedConnectionFactory<C extends IPhynixxConnection>
public Class<C> getConnectionInterface()
getConnectionInterface
in interface IPhynixxConnectionFactory<C extends IPhynixxConnection>
getConnectionInterface
in class PhynixxManagedConnectionFactory<C extends IPhynixxConnection>
public void connectionReleased(IManagedConnectionEvent<C> event)
connectionReleased
in interface IPhynixxManagedConnectionListener<C extends IPhynixxConnection>
connectionReleased
in class PhynixxManagedConnectionFactory<C extends IPhynixxConnection>
event
- current connectionpublic void connectionFreed(IManagedConnectionEvent<C> event)
connectionFreed
in interface IPhynixxManagedConnectionListener<C extends IPhynixxConnection>
connectionFreed
in class PhynixxManagedConnectionFactory<C extends IPhynixxConnection>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |