Skip to content

Conversation

artembilan
Copy link
Member

Fixes #3578

The JdbcTemplate.queryForMap() extract values for columns to the closer target driver types.
For example H2 and Derby return Long for BIGINT.
Oracle for its NUMBER(19,0) returns BigInteger.
This makes the code in the JdbcMessageStore.getMessageGroup()
not platform independent.

  • Fix JdbcMessageStore to map ResultSet to the MessageGroupMetadata
    directly.
    Mostly reinstating the previous behavior
  • For that reason expose a default ctor for MessageGroupMetadata
    and extract some setters to make code in the JdbcMessageStore more cleaner.
  • This opens for us a possibility to implement a MessageGroupStore.getGroupMetadata(groupId)
    for JdbcMessageStore
  • Fix deprecation for Flux.limitRequest()

Fixes spring-projects#3578

The `JdbcTemplate.queryForMap()` extract values for columns to the closer target driver types.
For example H2 and Derby return `Long` for `BIGINT`.
Oracle for its `NUMBER(19,0)` returns `BigInteger`.
This makes the code in the `JdbcMessageStore.getMessageGroup()`
not platform independent.

* Fix `JdbcMessageStore` to map `ResultSet` to the `MessageGroupMetadata`
directly.
Mostly reinstating the previous behavior
* For that reason expose a default ctor for `MessageGroupMetadata`
and extract some setters to make code in the `JdbcMessageStore` more cleaner.
* This opens for us a possibility to implement a `MessageGroupStore.getGroupMetadata(groupId)`
for `JdbcMessageStore`
* Fix deprecation for `Flux.limitRequest()`
@garyrussell garyrussell merged commit 3ddaad9 into spring-projects:main Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClassCastException in JdbcMessageStore.getMessageGroup() with Oracle DB

2 participants