@Deprecated public abstract class CciDaoSupport extends DaoSupport
Requires a ConnectionFactory
to be set,
providing a CciTemplate
based
on it to subclasses through the getCciTemplate()
method.
This base class is mainly intended for CciTemplate usage but can
also be used when working with a Connection directly or when using
org.springframework.jca.cci.object
classes.
setConnectionFactory(javax.resource.cci.ConnectionFactory)
,
getCciTemplate()
,
CciTemplate
logger
Constructor and Description |
---|
CciDaoSupport()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkDaoConfig()
Deprecated.
Abstract subclasses must override this to check their configuration.
|
protected CciTemplate |
createCciTemplate(ConnectionFactory connectionFactory)
Deprecated.
Create a CciTemplate for the given ConnectionFactory.
|
CciTemplate |
getCciTemplate()
Deprecated.
Return the CciTemplate for this DAO,
pre-initialized with the ConnectionFactory or set explicitly.
|
protected CciTemplate |
getCciTemplate(ConnectionSpec connectionSpec)
Deprecated.
Obtain a CciTemplate derived from the main template instance,
inheriting the ConnectionFactory and other settings but
overriding the ConnectionSpec used for obtaining Connections.
|
protected Connection |
getConnection()
Deprecated.
Get a CCI Connection, either from the current transaction or a new one.
|
ConnectionFactory |
getConnectionFactory()
Deprecated.
Return the ConnectionFactory used by this DAO.
|
protected void |
releaseConnection(Connection con)
Deprecated.
Close the given CCI Connection, created via this bean's ConnectionFactory,
if it isn't bound to the thread.
|
void |
setCciTemplate(CciTemplate cciTemplate)
Deprecated.
Set the CciTemplate for this DAO explicitly,
as an alternative to specifying a ConnectionFactory.
|
void |
setConnectionFactory(ConnectionFactory connectionFactory)
Deprecated.
Set the ConnectionFactory to be used by this DAO.
|
afterPropertiesSet, initDao
public final void setConnectionFactory(ConnectionFactory connectionFactory)
protected CciTemplate createCciTemplate(ConnectionFactory connectionFactory)
Can be overridden in subclasses to provide a CciTemplate instance with different configuration, or a custom CciTemplate subclass.
connectionFactory
- the CCI ConnectionFactory to create a CciTemplate forsetConnectionFactory(javax.resource.cci.ConnectionFactory)
@Nullable public final ConnectionFactory getConnectionFactory()
public final void setCciTemplate(CciTemplate cciTemplate)
@Nullable public final CciTemplate getCciTemplate()
protected final void checkDaoConfig()
DaoSupport
Implementors should be marked as final
if concrete subclasses
are not supposed to override this template method themselves.
checkDaoConfig
in class DaoSupport
protected final CciTemplate getCciTemplate(ConnectionSpec connectionSpec)
connectionSpec
- the CCI ConnectionSpec that the returned
template instance is supposed to obtain Connections forCciTemplate.getDerivedTemplate(javax.resource.cci.ConnectionSpec)
protected final Connection getConnection() throws CannotGetCciConnectionException
CannotGetCciConnectionException
- if the attempt to get a Connection failedConnectionFactoryUtils.getConnection(javax.resource.cci.ConnectionFactory)
protected final void releaseConnection(Connection con)
con
- the Connection to closeConnectionFactoryUtils.releaseConnection(javax.resource.cci.Connection, javax.resource.cci.ConnectionFactory)