parent
e0e1c12402
commit
3a653bd35f
|
|
@ -26,7 +26,10 @@ import org.springframework.dao.DataAccessResourceFailureException;
|
|||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class CannotCreateRecordException extends DataAccessResourceFailureException {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,10 @@ import org.springframework.dao.DataAccessResourceFailureException;
|
|||
* @author Thierry Templier
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class CannotGetCciConnectionException extends DataAccessResourceFailureException {
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException;
|
|||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class CciOperationNotSupportedException extends InvalidDataAccessResourceUsageException {
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,10 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException;
|
|||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @see javax.resource.cci.ResultSet
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class InvalidResultSetAccessException extends InvalidDataAccessResourceUsageException {
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,10 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException;
|
|||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class RecordTypeNotSupportedException extends InvalidDataAccessResourceUsageException {
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,10 @@ import org.springframework.util.Assert;
|
|||
* @see ConnectionFactoryUtils#releaseConnection
|
||||
* @see TransactionAwareConnectionFactoryProxy
|
||||
* @see org.springframework.jca.cci.core.CciTemplate
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class CciLocalTransactionManager extends AbstractPlatformTransactionManager
|
||||
implements ResourceTransactionManager, InitializingBean {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ import javax.resource.cci.ConnectionSpec;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.jca.cci.CannotGetCciConnectionException;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.transaction.support.ResourceHolderSynchronization;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
|
|
@ -49,7 +48,10 @@ import org.springframework.util.Assert;
|
|||
* @see CciLocalTransactionManager
|
||||
* @see org.springframework.transaction.jta.JtaTransactionManager
|
||||
* @see org.springframework.transaction.support.TransactionSynchronizationManager
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class ConnectionFactoryUtils {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(ConnectionFactoryUtils.class);
|
||||
|
|
@ -68,7 +70,9 @@ public abstract class ConnectionFactoryUtils {
|
|||
* if the attempt to get a Connection failed
|
||||
* @see #releaseConnection
|
||||
*/
|
||||
public static Connection getConnection(ConnectionFactory cf) throws CannotGetCciConnectionException {
|
||||
public static Connection getConnection(ConnectionFactory cf)
|
||||
throws org.springframework.jca.cci.CannotGetCciConnectionException {
|
||||
|
||||
return getConnection(cf, null);
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +93,7 @@ public abstract class ConnectionFactoryUtils {
|
|||
* @see #releaseConnection
|
||||
*/
|
||||
public static Connection getConnection(ConnectionFactory cf, @Nullable ConnectionSpec spec)
|
||||
throws CannotGetCciConnectionException {
|
||||
throws org.springframework.jca.cci.CannotGetCciConnectionException {
|
||||
try {
|
||||
if (spec != null) {
|
||||
Assert.notNull(cf, "No ConnectionFactory specified");
|
||||
|
|
@ -100,7 +104,7 @@ public abstract class ConnectionFactoryUtils {
|
|||
}
|
||||
}
|
||||
catch (ResourceException ex) {
|
||||
throw new CannotGetCciConnectionException("Could not get CCI Connection", ex);
|
||||
throw new org.springframework.jca.cci.CannotGetCciConnectionException("Could not get CCI Connection", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,10 @@ import org.springframework.transaction.support.ResourceHolderSupport;
|
|||
* @since 1.2
|
||||
* @see CciLocalTransactionManager
|
||||
* @see ConnectionFactoryUtils
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
public class ConnectionHolder extends ResourceHolderSupport {
|
||||
|
||||
private final Connection connection;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,10 @@ import org.springframework.util.Assert;
|
|||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @see #getConnection
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class ConnectionSpecConnectionFactoryAdapter extends DelegatingConnectionFactory {
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,10 @@ import org.springframework.util.Assert;
|
|||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @see #getConnection
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class DelegatingConnectionFactory implements ConnectionFactory, InitializingBean {
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,10 @@ import javax.resource.cci.RecordFactory;
|
|||
* @see org.springframework.jca.cci.core.CciTemplate#getRecordFactory(javax.resource.cci.ConnectionFactory)
|
||||
* @see javax.resource.cci.ConnectionFactory#getRecordFactory()
|
||||
* @see javax.resource.NotSupportedException
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
public class NotSupportedRecordFactory implements RecordFactory {
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -51,7 +51,10 @@ import org.springframework.util.Assert;
|
|||
* @see #getConnection()
|
||||
* @see javax.resource.cci.Connection#close()
|
||||
* @see org.springframework.jca.cci.core.CciTemplate
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class SingleConnectionFactory extends DelegatingConnectionFactory implements DisposableBean {
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,10 @@ import org.springframework.lang.Nullable;
|
|||
* @see javax.resource.cci.Connection#close
|
||||
* @see ConnectionFactoryUtils#doGetConnection
|
||||
* @see ConnectionFactoryUtils#doReleaseConnection
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class TransactionAwareConnectionFactoryProxy extends DelegatingConnectionFactory {
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,10 @@ import org.springframework.lang.Nullable;
|
|||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @see CciTemplate
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
public interface CciOperations {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -36,12 +36,6 @@ import org.apache.commons.logging.LogFactory;
|
|||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.DataAccessResourceFailureException;
|
||||
import org.springframework.jca.cci.CannotCreateRecordException;
|
||||
import org.springframework.jca.cci.CciOperationNotSupportedException;
|
||||
import org.springframework.jca.cci.InvalidResultSetAccessException;
|
||||
import org.springframework.jca.cci.RecordTypeNotSupportedException;
|
||||
import org.springframework.jca.cci.connection.ConnectionFactoryUtils;
|
||||
import org.springframework.jca.cci.connection.NotSupportedRecordFactory;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
|
@ -68,7 +62,10 @@ import org.springframework.util.Assert;
|
|||
* @since 1.2
|
||||
* @see RecordCreator
|
||||
* @see RecordExtractor
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
public class CciTemplate implements CciOperations {
|
||||
|
||||
private final Log logger = LogFactory.getLog(getClass());
|
||||
|
|
@ -209,21 +206,25 @@ public class CciTemplate implements CciOperations {
|
|||
public <T> T execute(ConnectionCallback<T> action) throws DataAccessException {
|
||||
Assert.notNull(action, "Callback object must not be null");
|
||||
ConnectionFactory connectionFactory = obtainConnectionFactory();
|
||||
Connection con = ConnectionFactoryUtils.getConnection(connectionFactory, getConnectionSpec());
|
||||
Connection con = org.springframework.jca.cci.connection.ConnectionFactoryUtils.getConnection(
|
||||
connectionFactory, getConnectionSpec());
|
||||
try {
|
||||
return action.doInConnection(con, connectionFactory);
|
||||
}
|
||||
catch (NotSupportedException ex) {
|
||||
throw new CciOperationNotSupportedException("CCI operation not supported by connector", ex);
|
||||
throw new org.springframework.jca.cci.CciOperationNotSupportedException(
|
||||
"CCI operation not supported by connector", ex);
|
||||
}
|
||||
catch (ResourceException ex) {
|
||||
throw new DataAccessResourceFailureException("CCI operation failed", ex);
|
||||
}
|
||||
catch (SQLException ex) {
|
||||
throw new InvalidResultSetAccessException("Parsing of CCI ResultSet failed", ex);
|
||||
throw new org.springframework.jca.cci.InvalidResultSetAccessException(
|
||||
"Parsing of CCI ResultSet failed", ex);
|
||||
}
|
||||
finally {
|
||||
ConnectionFactoryUtils.releaseConnection(con, getConnectionFactory());
|
||||
org.springframework.jca.cci.connection.ConnectionFactoryUtils.releaseConnection(
|
||||
con, getConnectionFactory());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -329,10 +330,12 @@ public class CciTemplate implements CciOperations {
|
|||
return recordFactory.createIndexedRecord(name);
|
||||
}
|
||||
catch (NotSupportedException ex) {
|
||||
throw new RecordTypeNotSupportedException("Creation of indexed Record not supported by connector", ex);
|
||||
throw new org.springframework.jca.cci.RecordTypeNotSupportedException(
|
||||
"Creation of indexed Record not supported by connector", ex);
|
||||
}
|
||||
catch (ResourceException ex) {
|
||||
throw new CannotCreateRecordException("Creation of indexed Record failed", ex);
|
||||
throw new org.springframework.jca.cci.CannotCreateRecordException(
|
||||
"Creation of indexed Record failed", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -350,10 +353,12 @@ public class CciTemplate implements CciOperations {
|
|||
return recordFactory.createMappedRecord(name);
|
||||
}
|
||||
catch (NotSupportedException ex) {
|
||||
throw new RecordTypeNotSupportedException("Creation of mapped Record not supported by connector", ex);
|
||||
throw new org.springframework.jca.cci.RecordTypeNotSupportedException(
|
||||
"Creation of mapped Record not supported by connector", ex);
|
||||
}
|
||||
catch (ResourceException ex) {
|
||||
throw new CannotCreateRecordException("Creation of mapped Record failed", ex);
|
||||
throw new org.springframework.jca.cci.CannotCreateRecordException(
|
||||
"Creation of mapped Record failed", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -372,11 +377,12 @@ public class CciTemplate implements CciOperations {
|
|||
return recordCreator.createRecord(recordFactory);
|
||||
}
|
||||
catch (NotSupportedException ex) {
|
||||
throw new RecordTypeNotSupportedException(
|
||||
throw new org.springframework.jca.cci.RecordTypeNotSupportedException(
|
||||
"Creation of the desired Record type not supported by connector", ex);
|
||||
}
|
||||
catch (ResourceException ex) {
|
||||
throw new CannotCreateRecordException("Creation of the desired Record failed", ex);
|
||||
throw new org.springframework.jca.cci.CannotCreateRecordException(
|
||||
"Creation of the desired Record failed", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -396,7 +402,7 @@ public class CciTemplate implements CciOperations {
|
|||
return connectionFactory.getRecordFactory();
|
||||
}
|
||||
catch (NotSupportedException ex) {
|
||||
return new NotSupportedRecordFactory();
|
||||
return new org.springframework.jca.cci.connection.NotSupportedRecordFactory();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,10 @@ import org.springframework.lang.Nullable;
|
|||
* @see CciTemplate#execute(ConnectionCallback)
|
||||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, javax.resource.cci.Record)
|
||||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor)
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@FunctionalInterface
|
||||
public interface ConnectionCallback<T> {
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,10 @@ import org.springframework.lang.Nullable;
|
|||
* @see CciTemplate#execute(InteractionCallback)
|
||||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, javax.resource.cci.Record)
|
||||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor)
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@FunctionalInterface
|
||||
public interface InteractionCallback<T> {
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,10 @@ import org.springframework.dao.DataAccessException;
|
|||
* @see CciTemplate#createIndexedRecord(String)
|
||||
* @see CciTemplate#createMappedRecord(String)
|
||||
* @see CciTemplate#setOutputRecordCreator(RecordCreator)
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@FunctionalInterface
|
||||
public interface RecordCreator {
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,10 @@ import org.springframework.lang.Nullable;
|
|||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, Record, RecordExtractor)
|
||||
* @see CciTemplate#execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor)
|
||||
* @see javax.resource.cci.ResultSet
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@FunctionalInterface
|
||||
public interface RecordExtractor<T> {
|
||||
|
||||
|
|
|
|||
|
|
@ -21,9 +21,6 @@ import javax.resource.cci.ConnectionFactory;
|
|||
import javax.resource.cci.ConnectionSpec;
|
||||
|
||||
import org.springframework.dao.support.DaoSupport;
|
||||
import org.springframework.jca.cci.CannotGetCciConnectionException;
|
||||
import org.springframework.jca.cci.connection.ConnectionFactoryUtils;
|
||||
import org.springframework.jca.cci.core.CciTemplate;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
|
@ -44,11 +41,14 @@ import org.springframework.util.Assert;
|
|||
* @see #setConnectionFactory
|
||||
* @see #getCciTemplate
|
||||
* @see org.springframework.jca.cci.core.CciTemplate
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class CciDaoSupport extends DaoSupport {
|
||||
|
||||
@Nullable
|
||||
private CciTemplate cciTemplate;
|
||||
private org.springframework.jca.cci.core.CciTemplate cciTemplate;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -69,8 +69,8 @@ public abstract class CciDaoSupport extends DaoSupport {
|
|||
* @return the new CciTemplate instance
|
||||
* @see #setConnectionFactory(javax.resource.cci.ConnectionFactory)
|
||||
*/
|
||||
protected CciTemplate createCciTemplate(ConnectionFactory connectionFactory) {
|
||||
return new CciTemplate(connectionFactory);
|
||||
protected org.springframework.jca.cci.core.CciTemplate createCciTemplate(ConnectionFactory connectionFactory) {
|
||||
return new org.springframework.jca.cci.core.CciTemplate(connectionFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -85,7 +85,7 @@ public abstract class CciDaoSupport extends DaoSupport {
|
|||
* Set the CciTemplate for this DAO explicitly,
|
||||
* as an alternative to specifying a ConnectionFactory.
|
||||
*/
|
||||
public final void setCciTemplate(CciTemplate cciTemplate) {
|
||||
public final void setCciTemplate(org.springframework.jca.cci.core.CciTemplate cciTemplate) {
|
||||
this.cciTemplate = cciTemplate;
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ public abstract class CciDaoSupport extends DaoSupport {
|
|||
* pre-initialized with the ConnectionFactory or set explicitly.
|
||||
*/
|
||||
@Nullable
|
||||
public final CciTemplate getCciTemplate() {
|
||||
public final org.springframework.jca.cci.core.CciTemplate getCciTemplate() {
|
||||
return this.cciTemplate;
|
||||
}
|
||||
|
||||
|
|
@ -115,8 +115,8 @@ public abstract class CciDaoSupport extends DaoSupport {
|
|||
* @return the derived template instance
|
||||
* @see org.springframework.jca.cci.core.CciTemplate#getDerivedTemplate(javax.resource.cci.ConnectionSpec)
|
||||
*/
|
||||
protected final CciTemplate getCciTemplate(ConnectionSpec connectionSpec) {
|
||||
CciTemplate cciTemplate = getCciTemplate();
|
||||
protected final org.springframework.jca.cci.core.CciTemplate getCciTemplate(ConnectionSpec connectionSpec) {
|
||||
org.springframework.jca.cci.core.CciTemplate cciTemplate = getCciTemplate();
|
||||
Assert.state(cciTemplate != null, "No CciTemplate set");
|
||||
return cciTemplate.getDerivedTemplate(connectionSpec);
|
||||
}
|
||||
|
|
@ -128,10 +128,10 @@ public abstract class CciDaoSupport extends DaoSupport {
|
|||
* if the attempt to get a Connection failed
|
||||
* @see org.springframework.jca.cci.connection.ConnectionFactoryUtils#getConnection(javax.resource.cci.ConnectionFactory)
|
||||
*/
|
||||
protected final Connection getConnection() throws CannotGetCciConnectionException {
|
||||
protected final Connection getConnection() throws org.springframework.jca.cci.CannotGetCciConnectionException {
|
||||
ConnectionFactory connectionFactory = getConnectionFactory();
|
||||
Assert.state(connectionFactory != null, "No ConnectionFactory set");
|
||||
return ConnectionFactoryUtils.getConnection(connectionFactory);
|
||||
return org.springframework.jca.cci.connection.ConnectionFactoryUtils.getConnection(connectionFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -141,7 +141,7 @@ public abstract class CciDaoSupport extends DaoSupport {
|
|||
* @see org.springframework.jca.cci.connection.ConnectionFactoryUtils#releaseConnection
|
||||
*/
|
||||
protected final void releaseConnection(Connection con) {
|
||||
ConnectionFactoryUtils.releaseConnection(con, getConnectionFactory());
|
||||
org.springframework.jca.cci.connection.ConnectionFactoryUtils.releaseConnection(con, getConnectionFactory());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,10 @@ import org.springframework.util.FileCopyUtils;
|
|||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @see org.springframework.jca.cci.object.MappingCommAreaOperation
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("serial")
|
||||
public class CommAreaRecord implements Record, Streamable {
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import javax.resource.cci.ConnectionFactory;
|
|||
import javax.resource.cci.InteractionSpec;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.jca.cci.core.CciTemplate;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
|
@ -35,10 +34,14 @@ import org.springframework.util.Assert;
|
|||
* @since 1.2
|
||||
* @see #setConnectionFactory
|
||||
* @see #setInteractionSpec
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class EisOperation implements InitializingBean {
|
||||
|
||||
private CciTemplate cciTemplate = new CciTemplate();
|
||||
private org.springframework.jca.cci.core.CciTemplate cciTemplate =
|
||||
new org.springframework.jca.cci.core.CciTemplate();
|
||||
|
||||
@Nullable
|
||||
private InteractionSpec interactionSpec;
|
||||
|
|
@ -49,7 +52,7 @@ public abstract class EisOperation implements InitializingBean {
|
|||
* Alternatively, specify a CCI ConnectionFactory.
|
||||
* @see #setConnectionFactory
|
||||
*/
|
||||
public void setCciTemplate(CciTemplate cciTemplate) {
|
||||
public void setCciTemplate(org.springframework.jca.cci.core.CciTemplate cciTemplate) {
|
||||
Assert.notNull(cciTemplate, "CciTemplate must not be null");
|
||||
this.cciTemplate = cciTemplate;
|
||||
}
|
||||
|
|
@ -57,7 +60,7 @@ public abstract class EisOperation implements InitializingBean {
|
|||
/**
|
||||
* Return the CciTemplate used by this operation.
|
||||
*/
|
||||
public CciTemplate getCciTemplate() {
|
||||
public org.springframework.jca.cci.core.CciTemplate getCciTemplate() {
|
||||
return this.cciTemplate;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import javax.resource.cci.RecordFactory;
|
|||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.DataRetrievalFailureException;
|
||||
import org.springframework.jca.cci.core.support.CommAreaRecord;
|
||||
|
||||
/**
|
||||
* EIS operation object for access to COMMAREA records.
|
||||
|
|
@ -33,7 +32,10 @@ import org.springframework.jca.cci.core.support.CommAreaRecord;
|
|||
*
|
||||
* @author Thierry Templier
|
||||
* @since 1.2
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class MappingCommAreaOperation extends MappingRecordOperation {
|
||||
|
||||
/**
|
||||
|
|
@ -57,7 +59,7 @@ public abstract class MappingCommAreaOperation extends MappingRecordOperation {
|
|||
@Override
|
||||
protected final Record createInputRecord(RecordFactory recordFactory, Object inObject) {
|
||||
try {
|
||||
return new CommAreaRecord(objectToBytes(inObject));
|
||||
return new org.springframework.jca.cci.core.support.CommAreaRecord(objectToBytes(inObject));
|
||||
}
|
||||
catch (IOException ex) {
|
||||
throw new DataRetrievalFailureException("I/O exception during bytes conversion", ex);
|
||||
|
|
@ -66,7 +68,8 @@ public abstract class MappingCommAreaOperation extends MappingRecordOperation {
|
|||
|
||||
@Override
|
||||
protected final Object extractOutputData(Record record) throws DataAccessException {
|
||||
CommAreaRecord commAreaRecord = (CommAreaRecord) record;
|
||||
org.springframework.jca.cci.core.support.CommAreaRecord commAreaRecord =
|
||||
(org.springframework.jca.cci.core.support.CommAreaRecord) record;
|
||||
try {
|
||||
return bytesToObject(commAreaRecord.toByteArray());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ import javax.resource.cci.Record;
|
|||
import javax.resource.cci.RecordFactory;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.jca.cci.core.RecordCreator;
|
||||
import org.springframework.jca.cci.core.RecordExtractor;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
|
@ -45,7 +43,10 @@ import org.springframework.util.Assert;
|
|||
* @since 1.2
|
||||
* @see #createInputRecord(javax.resource.cci.RecordFactory, Object)
|
||||
* @see #extractOutputData(javax.resource.cci.Record)
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class MappingRecordOperation extends EisOperation {
|
||||
|
||||
/**
|
||||
|
|
@ -75,7 +76,7 @@ public abstract class MappingRecordOperation extends EisOperation {
|
|||
* @see javax.resource.cci.Interaction#execute(javax.resource.cci.InteractionSpec, Record, Record)
|
||||
* @see org.springframework.jca.cci.core.CciTemplate#setOutputRecordCreator
|
||||
*/
|
||||
public void setOutputRecordCreator(RecordCreator creator) {
|
||||
public void setOutputRecordCreator(org.springframework.jca.cci.core.RecordCreator creator) {
|
||||
getCciTemplate().setOutputRecordCreator(creator);
|
||||
}
|
||||
|
||||
|
|
@ -126,7 +127,7 @@ public abstract class MappingRecordOperation extends EisOperation {
|
|||
* Implementation of RecordCreator that calls the enclosing
|
||||
* class's {@code createInputRecord} method.
|
||||
*/
|
||||
protected class RecordCreatorImpl implements RecordCreator {
|
||||
protected class RecordCreatorImpl implements org.springframework.jca.cci.core.RecordCreator {
|
||||
|
||||
private final Object inputObject;
|
||||
|
||||
|
|
@ -145,7 +146,7 @@ public abstract class MappingRecordOperation extends EisOperation {
|
|||
* Implementation of RecordExtractor that calls the enclosing
|
||||
* class's {@code extractOutputData} method.
|
||||
*/
|
||||
protected class RecordExtractorImpl implements RecordExtractor<Object> {
|
||||
protected class RecordExtractorImpl implements org.springframework.jca.cci.core.RecordExtractor<Object> {
|
||||
|
||||
@Override
|
||||
public Object extractData(Record record) throws ResourceException, SQLException, DataAccessException {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,10 @@ import org.springframework.util.Assert;
|
|||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
* @deprecated as of 5.3, in favor of specific data access APIs
|
||||
* (or native CCI usage if there is no alternative)
|
||||
*/
|
||||
@Deprecated
|
||||
public class SimpleRecordOperation extends EisOperation {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import static org.mockito.Mockito.verify;
|
|||
* @author Thierry Templier
|
||||
* @author Chris Beams
|
||||
*/
|
||||
@Deprecated
|
||||
public class CciLocalTransactionTests {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ import static org.mockito.Mockito.verify;
|
|||
* @author Juergen Hoeller
|
||||
* @author Chris Beams
|
||||
*/
|
||||
@Deprecated
|
||||
public class CciTemplateTests {
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ import static org.mockito.Mockito.verify;
|
|||
* @author Thierry Templier
|
||||
* @author Chris Beams
|
||||
*/
|
||||
@Deprecated
|
||||
public class EisOperationTests {
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -4045,11 +4045,6 @@ dependency type. The following table summarizes the most important `Aware` inter
|
|||
| Name of the declaring bean.
|
||||
| <<beans-factory-aware>>
|
||||
|
||||
| `BootstrapContextAware`
|
||||
| Resource adapter `BootstrapContext` the container runs in. Typically available only in
|
||||
JCA-aware `ApplicationContext` instances.
|
||||
| <<integration.adoc#cci, JCA CCI>>
|
||||
|
||||
| `LoadTimeWeaverAware`
|
||||
| Defined weaver for processing class definition at load time.
|
||||
| <<aop-aj-ltw>>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue