| java.lang.Object org.springframework.jca.cci.connection.ConnectionFactoryUtils
Method Summary | |
public static Connection | doGetConnection(ConnectionFactory cf) Actually obtain a CCI Connection from the given ConnectionFactory.
Same as
ConnectionFactoryUtils.getConnection , but throwing the original ResourceException.
Is aware of a corresponding Connection bound to the current thread, for example
when using
CciLocalTransactionManager . | public static void | doReleaseConnection(Connection con, ConnectionFactory cf) Actually close the given Connection, obtained from the given ConnectionFactory. | public static Connection | getConnection(ConnectionFactory cf) Obtain a Connection from the given ConnectionFactory. | public static Connection | getConnection(ConnectionFactory cf, ConnectionSpec spec) Obtain a Connection from the given ConnectionFactory. | public static boolean | isConnectionTransactional(Connection con, ConnectionFactory cf) Determine whether the given JCA CCI Connection is transactional, that is,
bound to the current thread by Spring's transaction facilities. | public static void | releaseConnection(Connection con, ConnectionFactory cf) Close the given Connection, obtained from the given ConnectionFactory,
if it is not managed externally (that is, not bound to the thread). |
doGetConnection | public static Connection doGetConnection(ConnectionFactory cf) throws ResourceException(Code) | | Actually obtain a CCI Connection from the given ConnectionFactory.
Same as
ConnectionFactoryUtils.getConnection , but throwing the original ResourceException.
Is aware of a corresponding Connection bound to the current thread, for example
when using
CciLocalTransactionManager . Will bind a Connection to the thread
if transaction synchronization is active (e.g. if in a JTA transaction).
Directly accessed by
TransactionAwareConnectionFactoryProxy .
Parameters: cf - the ConnectionFactory to obtain Connection from a CCI Connection from the given ConnectionFactory throws: ResourceException - if thrown by CCI API methods See Also: ConnectionFactoryUtils.doReleaseConnection |
doReleaseConnection | public static void doReleaseConnection(Connection con, ConnectionFactory cf) throws ResourceException(Code) | | Actually close the given Connection, obtained from the given ConnectionFactory.
Same as
ConnectionFactoryUtils.releaseConnection , but throwing the original ResourceException.
Directly accessed by
TransactionAwareConnectionFactoryProxy .
Parameters: con - the Connection to close if necessary(if this is null , the call will be ignored) Parameters: cf - the ConnectionFactory that the Connection was obtained from(can be null ) throws: ResourceException - if thrown by JCA CCI methods See Also: ConnectionFactoryUtils.doGetConnection |
getConnection | public static Connection getConnection(ConnectionFactory cf) throws CannotGetCciConnectionException(Code) | | Obtain a Connection from the given ConnectionFactory. Translates ResourceExceptions
into the Spring hierarchy of unchecked generic data access exceptions, simplifying
calling code and making any exception that is thrown more meaningful.
Is aware of a corresponding Connection bound to the current thread, for example
when using
CciLocalTransactionManager . Will bind a Connection to the thread
if transaction synchronization is active (e.g. if in a JTA transaction).
Parameters: cf - the ConnectionFactory to obtain Connection from a CCI Connection from the given ConnectionFactory throws: org.springframework.jca.cci.CannotGetCciConnectionException - if the attempt to get a Connection failed See Also: ConnectionFactoryUtils.releaseConnection |
getConnection | public static Connection getConnection(ConnectionFactory cf, ConnectionSpec spec) throws CannotGetCciConnectionException(Code) | | Obtain a Connection from the given ConnectionFactory. Translates ResourceExceptions
into the Spring hierarchy of unchecked generic data access exceptions, simplifying
calling code and making any exception that is thrown more meaningful.
Is aware of a corresponding Connection bound to the current thread, for example
when using
CciLocalTransactionManager . Will bind a Connection to the thread
if transaction synchronization is active (e.g. if in a JTA transaction).
Parameters: cf - the ConnectionFactory to obtain Connection from Parameters: spec - the ConnectionSpec for the desired Connection (may be null ).Note: If this is specified, a new Connection will be obtained for every call,without participating in a shared transactional Connection. a CCI Connection from the given ConnectionFactory throws: org.springframework.jca.cci.CannotGetCciConnectionException - if the attempt to get a Connection failed See Also: ConnectionFactoryUtils.releaseConnection |
isConnectionTransactional | public static boolean isConnectionTransactional(Connection con, ConnectionFactory cf)(Code) | | Determine whether the given JCA CCI Connection is transactional, that is,
bound to the current thread by Spring's transaction facilities.
Parameters: con - the Connection to check Parameters: cf - the ConnectionFactory that the Connection was obtained from(may be null ) whether the Connection is transactional |
releaseConnection | public static void releaseConnection(Connection con, ConnectionFactory cf)(Code) | | Close the given Connection, obtained from the given ConnectionFactory,
if it is not managed externally (that is, not bound to the thread).
Parameters: con - the Connection to close if necessary(if this is null , the call will be ignored) Parameters: cf - the ConnectionFactory that the Connection was obtained from(can be null ) See Also: ConnectionFactoryUtils.getConnection |
|
|