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