// Setup batch to modify value to 10 * the id (makes verification easy).
CallableStatement cstmt = prepareCall("CALL BATCH_UPDATE_PROC(?,?)");
cstmt.setInt(1,2); // Id 2's value will be updated to 20.
cstmt.setInt(2,20);
cstmt.addBatch();
cstmt.setInt(1,3); // Id 3's value will be updated to 30.
cstmt.setInt(2,30);
cstmt.addBatch();
cstmt.setInt(1,4); // Two rows will be updated to 40 for id 4.
cstmt.setInt(2,40);