mirror of https://github.com/apache/activemq.git
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:
parent
a234a6d495
commit
862c1f2138
|
@ -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 {
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue