Applied patch from haliq for AMQ-574

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@378218 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-02-16 10:35:59 +00:00
parent a234a6d495
commit 862c1f2138
2 changed files with 5 additions and 3 deletions

View File

@ -20,6 +20,7 @@ import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.DataSource;
@ -90,8 +91,9 @@ public class TransactionContext {
try {
int[] rc = p.executeBatch();
for (int i = 0; i < rc.length; i++) {
if ( rc[i]!= 1 ) {
throw new SQLException(message);
int code = rc[i];
if ( code > 0 || code == Statement.SUCCESS_NO_INFO ) {
throw new SQLException(message + ". Response code: " + code);
}
}
} finally {

View File

@ -51,7 +51,7 @@ public class OracleJDBCAdapter extends DefaultJDBCAdapter {
protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException {
// Get as a BLOB
Blob aBlob = rs.getBlob(1);
Blob aBlob = rs.getBlob(index);
return aBlob.getBytes(1, (int) aBlob.length());
}
}