org.csc.phynixx.connection
Class PhynixxManagedConnectionFactory<C extends IPhynixxConnection>

java.lang.Object
  extended by org.csc.phynixx.connection.PhynixxManagedConnectionListenerAdapter<C>
      extended by org.csc.phynixx.connection.PhynixxManagedConnectionFactory<C>
Type Parameters:
C -
All Implemented Interfaces:
IPhynixxConnectionFactory<C>, IPhynixxManagedConnectionFactory<C>, IPhynixxManagedConnectionListener<C>
Direct Known Subclasses:
PooledPhynixxManagedConnectionFactory

public class PhynixxManagedConnectionFactory<C extends IPhynixxConnection>
extends PhynixxManagedConnectionListenerAdapter<C>
implements IPhynixxManagedConnectionFactory<C>, IPhynixxManagedConnectionListener<C>

managedConnection are proxies for connections created by a IPhynixxConnectionFactory. The proxy adds serveral capabilities to the (core-)connection

   1.)


 


Constructor Summary
PhynixxManagedConnectionFactory()
           
PhynixxManagedConnectionFactory(IPhynixxConnectionFactory<C> connectionFactory)
           
 
Method Summary
 void addManagedConnectionDecorator(IPhynixxConnectionProxyDecorator<C> connectionProxyDecorator)
           
 void close()
          closes all currently opened connections
 void connectionFreed(IManagedConnectionEvent<C> event)
          NOOP
 void connectionReleased(IManagedConnectionEvent<C> event)
          the connection is released to the pool
 C getConnection()
          gets an new instance of the connection
 IPhynixxConnectionFactory<C> getConnectionFactory()
           
 Class<C> getConnectionInterface()
           
 IPhynixxLoggerSystemStrategy<C> getLoggerSystemStrategy()
           
 IPhynixxManagedConnection<C> getManagedConnection()
          the returned connection has to be explicitly closed
 List<IPhynixxConnectionProxyDecorator<C>> getManagedConnectionDecorators()
           
protected  IPhynixxManagedConnection<C> instantiateConnection()
           
 boolean isAutocommitAware()
           
 boolean isSynchronizeConnection()
           
 void setAutocommitAware(boolean autocommitAware)
          Default ist true
 void setConnectionFactory(IPhynixxConnectionFactory<C> connectionFactory)
           
 void setLoggerSystemStrategy(IPhynixxLoggerSystemStrategy<C> loggerSystemStrategy)
           
 void setSynchronizeConnection(boolean synchronizeConnection)
           
 
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

PhynixxManagedConnectionFactory

public PhynixxManagedConnectionFactory()

PhynixxManagedConnectionFactory

public PhynixxManagedConnectionFactory(IPhynixxConnectionFactory<C> connectionFactory)
Method Detail

isAutocommitAware

public boolean isAutocommitAware()
Specified by:
isAutocommitAware in interface IPhynixxManagedConnectionFactory<C extends IPhynixxConnection>

setAutocommitAware

public void setAutocommitAware(boolean autocommitAware)
Description copied from interface: IPhynixxManagedConnectionFactory
Default ist true

Specified by:
setAutocommitAware in interface IPhynixxManagedConnectionFactory<C extends IPhynixxConnection>

isSynchronizeConnection

public boolean isSynchronizeConnection()
Specified by:
isSynchronizeConnection in interface IPhynixxManagedConnectionFactory<C extends IPhynixxConnection>

setSynchronizeConnection

public void setSynchronizeConnection(boolean synchronizeConnection)
Specified by:
setSynchronizeConnection in interface IPhynixxManagedConnectionFactory<C extends IPhynixxConnection>

setConnectionFactory

public void setConnectionFactory(IPhynixxConnectionFactory<C> connectionFactory)

getConnectionFactory

public IPhynixxConnectionFactory<C> getConnectionFactory()

getManagedConnectionDecorators

public List<IPhynixxConnectionProxyDecorator<C>> getManagedConnectionDecorators()

addManagedConnectionDecorator

public void addManagedConnectionDecorator(IPhynixxConnectionProxyDecorator<C> connectionProxyDecorator)

getLoggerSystemStrategy

public IPhynixxLoggerSystemStrategy<C> getLoggerSystemStrategy()

setLoggerSystemStrategy

public void setLoggerSystemStrategy(IPhynixxLoggerSystemStrategy<C> loggerSystemStrategy)

getConnection

public C getConnection()
Description copied from interface: IPhynixxConnectionFactory
gets an new instance of the connection

Specified by:
getConnection in interface IPhynixxConnectionFactory<C extends IPhynixxConnection>
Specified by:
getConnection in interface IPhynixxManagedConnectionFactory<C extends IPhynixxConnection>

getManagedConnection

public IPhynixxManagedConnection<C> getManagedConnection()
Description copied from interface: IPhynixxManagedConnectionFactory
the returned connection has to be explicitly closed

Specified by:
getManagedConnection in interface IPhynixxManagedConnectionFactory<C extends IPhynixxConnection>
Returns:
a ready for use managed connection

instantiateConnection

protected IPhynixxManagedConnection<C> instantiateConnection()

getConnectionInterface

public Class<C> getConnectionInterface()
Specified by:
getConnectionInterface in interface IPhynixxConnectionFactory<C extends IPhynixxConnection>
Returns:
the class of the connection's interface

close

public void close()
Description copied from interface: IPhynixxManagedConnectionFactory
closes all currently opened connections

Specified by:
close in interface IPhynixxConnectionFactory<C extends IPhynixxConnection>
Specified by:
close in interface IPhynixxManagedConnectionFactory<C extends IPhynixxConnection>

connectionReleased

public void connectionReleased(IManagedConnectionEvent<C> event)
the connection is released to the pool

Specified by:
connectionReleased in interface IPhynixxManagedConnectionListener<C extends IPhynixxConnection>
Overrides:
connectionReleased in class PhynixxManagedConnectionListenerAdapter<C extends IPhynixxConnection>
Parameters:
event - current connection

connectionFreed

public void connectionFreed(IManagedConnectionEvent<C> event)
Description copied from class: PhynixxManagedConnectionListenerAdapter
NOOP

Specified by:
connectionFreed in interface IPhynixxManagedConnectionListener<C extends IPhynixxConnection>
Overrides:
connectionFreed in class PhynixxManagedConnectionListenerAdapter<C extends IPhynixxConnection>


Copyright © 2015. All rights reserved.