Recupere ResultSet usando CallableStatement después de executeBatch ()

Necesito llamar al procedimiento almacenado varias veces y usarexecuteBatch() para esto. Cada llamada debería devolver la tabla con los resultados, pero no pude acceder a estos resultados. El siguiente código funciona bien:

callableStatement.setString(1, "foo");
callableStatement.setString(2, "bar");
callableStatement.execute();
resultSet = callableStatement.getResultSet();

Pero el siguiente código no funciona como se esperaba:

for (String str : strings) {
    callableStatement.setString(1, str);
    callableStatement.setString(2, "bar");
    callableStatement.addBatch();
}
callableStatement.executeBatch();
resultSet = callableStatement.getResultSet(); // returns null

Ya he intentado llamarcallableStatement.getUpdateCount() ycallableStatement.getMoreResults() Antes de extraer ResultSet, pero sin éxito.

Respuestas a la pregunta(1)

Su respuesta a la pregunta