org.springframework.jca.cci.connection
Class DelegatingConnectionFactory
java.lang.Object
org.springframework.jca.cci.connection.DelegatingConnectionFactory
- All Implemented Interfaces:
- java.io.Serializable, javax.naming.Referenceable, javax.resource.cci.ConnectionFactory, org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
- ConnectionSpecConnectionFactoryAdapter, SingleConnectionFactory, TransactionAwareConnectionFactoryProxy
public class DelegatingConnectionFactory
- extends java.lang.Object
- implements javax.resource.cci.ConnectionFactory, org.springframework.beans.factory.InitializingBean
CCI ConnectionFactory
implementation that delegates all calls
to a given target ConnectionFactory
.
This class is meant to be subclassed, with subclasses overriding only
those methods (such as getConnection()
) that should not simply
delegate to the target ConnectionFactory
.
- Since:
- 1.2
- Author:
- Juergen Hoeller
- See Also:
getConnection()
,
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelegatingConnectionFactory
public DelegatingConnectionFactory()
setTargetConnectionFactory
public void setTargetConnectionFactory(javax.resource.cci.ConnectionFactory targetConnectionFactory)
- Set the target ConnectionFactory that this ConnectionFactory should delegate to.
getTargetConnectionFactory
public javax.resource.cci.ConnectionFactory getTargetConnectionFactory()
- Return the target ConnectionFactory that this ConnectionFactory should delegate to.
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
getConnection
public javax.resource.cci.Connection getConnection()
throws javax.resource.ResourceException
- Specified by:
getConnection
in interface javax.resource.cci.ConnectionFactory
- Throws:
javax.resource.ResourceException
getConnection
public javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionSpec connectionSpec)
throws javax.resource.ResourceException
- Specified by:
getConnection
in interface javax.resource.cci.ConnectionFactory
- Throws:
javax.resource.ResourceException
getRecordFactory
public javax.resource.cci.RecordFactory getRecordFactory()
throws javax.resource.ResourceException
- Specified by:
getRecordFactory
in interface javax.resource.cci.ConnectionFactory
- Throws:
javax.resource.ResourceException
getMetaData
public javax.resource.cci.ResourceAdapterMetaData getMetaData()
throws javax.resource.ResourceException
- Specified by:
getMetaData
in interface javax.resource.cci.ConnectionFactory
- Throws:
javax.resource.ResourceException
getReference
public javax.naming.Reference getReference()
throws javax.naming.NamingException
- Specified by:
getReference
in interface javax.naming.Referenceable
- Throws:
javax.naming.NamingException
setReference
public void setReference(javax.naming.Reference reference)