-
Bug
-
Resolution: Obsolete
-
Minor
-
JBossAS-4.0.5.GA
-
None
-
jboss 4.0.5 on windows xp / linux with database oracle 10.0.2
When I set statements cache in oracle-xa-ds.xml:
<prepared-statement-cache-size>100</prepared-statement-cache-size>
For the following statement:
BEGIN
UPDATE table SET A=? WHERE ID=? AND TIME=? RETURNING TIME INTO ?;
END
con = DataSourceManager.getConnection();
statement = con.prepareCall( 'The above query');
statement.setInt(1,1);
statement.setTimestamp(2, myTime);
statement.registerOutParameter(3, Types.TIMESTAMP);
statement.executeUpdate();
final Timestamp ts = statement.getTimestamp(lastIndex);
In this scenario, I'm always getting back the time result even if the update didn't match any row in database.
When I drop the statement cache I get the result only if there was a row that was updated by this statement.
I can't use the return value from executeUpdate() since it always return 1.