Here is the patch that fixes this:
The old call to con.prepareStatement(sql,int,int)
was implemented like this:
public PreparedStatement prepareStatement(String sql,
int resultSetType, int resultSetConcurrency) throws
SQLException {
return this.prepareStatement(sql);
}
it should be like so:
public PreparedStatement prepareStatement(String sql,
int resultSetType, int resultSetConcurrency) throws
SQLException {
if(con == null) throw new SQLException(CLOSED);
try {
return con.prepareStatement(sql,
resultSetType, resultSetConcurrency);
} catch(SQLException e) {
setError(e);
throw e;
}
}
I have tested this out (although not with the
testsuite) and it works well - seems like a simple
oversight considering the implementations of
prepareStatment() and prepareCall() around it were
done correctly.
I have included the minimally changed
XAClientConnection.java file
XAClientConnection.java fix for bug #506549
Logged In: YES
user_id=175228
Applied for 2.4.5