Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change handling of TYPE_FORWARD_ONLY with HOLD_CURSORS_OVER_COMMIT #802

Closed
mrotteveel opened this issue Apr 10, 2024 · 2 comments
Closed

Comments

@mrotteveel
Copy link
Member

mrotteveel commented Apr 10, 2024

Currently, when a TYPE_FORWARD_ONLY is requested with HOLD_CURSORS_OVER_COMMIT, the result set is "upgraded" to TYPE_SCROLL_INSENSITIVE and a warning is registered. This upgrade is done because when using TYPE_SCROLL_INSENSITIVE, the entire result set is cached, so the result set is materialized immediately.

There are basically two alternatives:

  1. (complex) if one or more result sets are HOLD_CURSORS_OVER_COMMIT, use commit/rollback retain and only really commit or rollback after all holdable result sets are closed.

  2. (simple, quick&dirty) keep the current inner-workings that materialize the result set immediately, but wrap it so that it still behaves as a TYPE_FORWARD_ONLY (or use the existing forwardOnly parameter, which is used for "cached" result sets), removing the need for registering the upgrade warning.

@mrotteveel
Copy link
Member Author

Alternative option: add a connection property and/or system property to suppress/ignore JDBC warnings

mrotteveel added a commit that referenced this issue Nov 5, 2024
@mrotteveel
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant