Application code is required to retrieve the CCI Connection via {@link ConnectionFactoryUtils#getConnection(ConnectionFactory)} instead of a standardJ2EE-style {@link ConnectionFactory#getConnection()} call. Spring classes such as{@link org.springframework.jca.cci.core.CciTemplate} use this strategy implicitly.If not used in combination with this transaction manager, the {@link ConnectionFactoryUtils} lookup strategy behaves exactly like the nativeDataSource lookup; it can thus be used in a portable fashion.
Alternatively, you can allow application code to work with the standard J2EE lookup pattern {@link ConnectionFactory#getConnection()}, for example for legacy code that is not aware of Spring at all. In that case, define a {@link TransactionAwareConnectionFactoryProxy} for your target ConnectionFactory,which will automatically participate in Spring-managed transactions. @author Thierry Templier @author Juergen Hoeller @since 1.2 @see ConnectionFactoryUtils#getConnection(javax.resource.cci.ConnectionFactory) @see ConnectionFactoryUtils#releaseConnection @see TransactionAwareConnectionFactoryProxy @see org.springframework.jca.cci.core.CciTemplate
|
|
|
|