use of org.springframework.jca.cci.CciOperationNotSupportedException in project spring-framework by spring-projects.
the class CciTemplate method execute.
@Override
public <T> T execute(ConnectionCallback<T> action) throws DataAccessException {
Assert.notNull(action, "Callback object must not be null");
Connection con = ConnectionFactoryUtils.getConnection(getConnectionFactory(), getConnectionSpec());
try {
return action.doInConnection(con, getConnectionFactory());
} catch (NotSupportedException ex) {
throw new 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);
} finally {
ConnectionFactoryUtils.releaseConnection(con, getConnectionFactory());
}
}
Aggregations