Class DelegatingConnectionFactory
- java.lang.Object
- org.springframework.jca.cci.connection.DelegatingConnectionFactory
- All Implemented Interfaces:
Serializable,Referenceable,ConnectionFactory,Referenceable,InitializingBean
- Direct Known Subclasses:
ConnectionSpecConnectionFactoryAdapter,SingleConnectionFactory,TransactionAwareConnectionFactoryProxy
public class DelegatingConnectionFactory extends Object implements ConnectionFactory, InitializingBean
CCIConnectionFactoryimplementation that delegates all calls to a given targetConnectionFactory.This class is meant to be subclassed, with subclasses overriding only those methods (such as
getConnection()) that should not simply delegate to the targetConnectionFactory.- Since:
- 1.2
- Author:
- Juergen Hoeller
- See Also:
getConnection(), Serialized Form
Constructor Summary
Constructors Constructor Description DelegatingConnectionFactory()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()Invoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.ConnectiongetConnection()ConnectiongetConnection(ConnectionSpec connectionSpec)ResourceAdapterMetaDatagetMetaData()RecordFactorygetRecordFactory()ReferencegetReference()ConnectionFactorygetTargetConnectionFactory()Return the target ConnectionFactory that this ConnectionFactory should delegate to.voidsetReference(Reference reference)voidsetTargetConnectionFactory(ConnectionFactory targetConnectionFactory)Set the target ConnectionFactory that this ConnectionFactory should delegate to.
Constructor Detail
DelegatingConnectionFactory
public DelegatingConnectionFactory()
Method Detail
setTargetConnectionFactory
public void setTargetConnectionFactory(ConnectionFactory targetConnectionFactory)
Set the target ConnectionFactory that this ConnectionFactory should delegate to.
getTargetConnectionFactory
public ConnectionFactory getTargetConnectionFactory()
Return the target ConnectionFactory that this ConnectionFactory should delegate to.
afterPropertiesSet
public void afterPropertiesSet()
Description copied from interface:InitializingBeanInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
- Specified by:
afterPropertiesSetin interfaceInitializingBean
getConnection
public Connection getConnection() throws ResourceException
- Specified by:
getConnectionin interfaceConnectionFactory- Throws:
ResourceException
getConnection
public Connection getConnection(ConnectionSpec connectionSpec) throws ResourceException
- Specified by:
getConnectionin interfaceConnectionFactory- Throws:
ResourceException
getRecordFactory
public RecordFactory getRecordFactory() throws ResourceException
- Specified by:
getRecordFactoryin interfaceConnectionFactory- Throws:
ResourceException
getMetaData
public ResourceAdapterMetaData getMetaData() throws ResourceException
- Specified by:
getMetaDatain interfaceConnectionFactory- Throws:
ResourceException
getReference
public Reference getReference() throws NamingException
- Specified by:
getReferencein interfaceReferenceable- Throws:
NamingException
setReference
public void setReference(Reference reference)
- Specified by:
setReferencein interfaceReferenceable