java.lang.Objectorg.springframework.jca.cci.connection.DelegatingConnectionFactory
org.springframework.jca.cci.connection.TransactionAwareConnectionFactoryProxy
All Implemented Interfaces:
javax.resource.cci.ConnectionFactory, InitializingBean
Data access code that should remain unaware of Spring's data access support can work with this proxy to seamlessly participate in Spring-managed transactions. Note that the transaction manager, for example the CciLocalTransactionManager , still needs to work with underlying ConnectionFactory, not with this proxy.
Make sure that TransactionAwareConnectionFactoryProxy is the outermost ConnectionFactory of a chain of ConnectionFactory proxies/adapters. TransactionAwareConnectionFactoryProxy can delegate either directly to the target connection pool or to some intermediate proxy/adapter like ConnectionSpecConnectionFactoryAdapter .
Delegates to ConnectionFactoryUtils for automatically participating in
thread-bound transactions, for example managed by CciLocalTransactionManager .
getConnection calls and close calls on returned Connections
will behave properly within a transaction, i.e. always operate on the transactional
Connection. If not within a transaction, normal ConnectionFactory behavior applies.
This proxy allows data access code to work with the plain JCA CCI API and still participate in Spring-managed transactions, similar to CCI code in a J2EE/JTA environment. However, if possible, use Spring's ConnectionFactoryUtils, CciTemplate or CCI operation objects to get transaction participation even without a proxy for the target ConnectionFactory, avoiding the need to define such a proxy in the first place.
NOTE: This ConnectionFactory proxy needs to return wrapped Connections in order to handle close calls properly. Therefore, the returned Connections cannot be cast to a native CCI Connection type or to a connection pool implementation type.
Juergen - Hoeller1.2 - | Constructor: |
|---|
|
|
| Method from org.springframework.jca.cci.connection.TransactionAwareConnectionFactoryProxy Summary: |
|---|
| getConnection, getTransactionAwareConnectionProxy |
| Methods from org.springframework.jca.cci.connection.DelegatingConnectionFactory: |
|---|
| afterPropertiesSet, getConnection, getConnection, getMetaData, getRecordFactory, getReference, getTargetConnectionFactory, setReference, setTargetConnectionFactory |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.springframework.jca.cci.connection.TransactionAwareConnectionFactoryProxy Detail: |
|---|
|
close calls to ConnectionFactoryUtils. |