You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope this message finds you well. I'm reaching out to discuss a potential issue I've encountered while integrating R2DBC H2 with Spring Boot.
Description:
In a project using Spring Boot and R2DBC H2, I've observed that whenever a method in the repository layer is annotated with @Transactional, R2DBC H2 consistently logs a message about the connection's read-only status.
This behavior was noted during my usage of these technologies, and after a thorough search through existing issues and discussions on GitHub, as well as a comprehensive review of relevant topics on Stack Overflow, I couldn't find any mention or solution to this specific scenario.
The issue seems to be related to how the readOnly property is handled in R2DBC H2, specifically in H2Connection.java (refer to code: H2Connection.java Line 96.
Issue:
In R2DBC H2, readOnly is a Boolean type, allowing for null, true, or false values. However, in Spring Boot's @Transactional annotation, readOnly is a primitive boolean type with a default value of false. This results in R2DBC H2 logging a read-only state message even when the readOnly attribute in the @Transactional annotation is not explicitly set (thus, defaulting to false). This could lead to some confusion, as developers might mistakenly think that some transactions are incorrectly set to read-only.
Questions:
Is it intentional for R2DBC H2 to handle the readOnly attribute in this manner?
Is this logging behavior as expected?
Is there a possibility to adjust R2DBC H2 to better accommodate the interaction with Spring Boot's @Transactional annotation?
Additional Information:
Spring Boot version: 3.2.0
R2DBC H2 version: 1.0.0-RELEASE
I appreciate any guidance or information you can provide on this matter. Thank you for your time and dedication to maintaining this project.
The text was updated successfully, but these errors were encountered:
Hello R2DBC H2 Team,
I hope this message finds you well. I'm reaching out to discuss a potential issue I've encountered while integrating R2DBC H2 with Spring Boot.
Description:
In a project using Spring Boot and R2DBC H2, I've observed that whenever a method in the repository layer is annotated with
@Transactional
, R2DBC H2 consistently logs a message about the connection's read-only status.This behavior was noted during my usage of these technologies, and after a thorough search through existing issues and discussions on GitHub, as well as a comprehensive review of relevant topics on Stack Overflow, I couldn't find any mention or solution to this specific scenario.
The issue seems to be related to how the readOnly property is handled in R2DBC H2, specifically in H2Connection.java (refer to code: H2Connection.java Line 96.
Issue:
In R2DBC H2, readOnly is a Boolean type, allowing for null, true, or false values. However, in Spring Boot's
@Transactional
annotation, readOnly is a primitive boolean type with a default value of false. This results in R2DBC H2 logging a read-only state message even when the readOnly attribute in the@Transactional annotation
is not explicitly set (thus, defaulting to false). This could lead to some confusion, as developers might mistakenly think that some transactions are incorrectly set to read-only.Questions:
@Transactional
annotation?Additional Information:
I appreciate any guidance or information you can provide on this matter. Thank you for your time and dedication to maintaining this project.
The text was updated successfully, but these errors were encountered: