Replies: 1 comment 3 replies
-
It's probably database / driver related. Check if your data are saved. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys!
I ran into a very odd issue that I would like to share to see if it's my mistake, or if the framework is not intended for the way I'm using it.
I'm conditionally setting a
DataSource
as readOnly or not based on the value of a few properties via aBeanCreatedEventListener<DatasourceConfiguration>
listener (thanks Graeme for this suggestion).This works really well for single-threaded code, but when using multiple threads I noticed that this configuration is not honored, and write transactions are executed and the
readOnly
flag is silently ignored.In any case, I created a PoC app that you can find below. This application sets the
readOnly
flag to true, to expose this behavior I described above:https://github.com/Nahuel92/poc-projects/tree/master/micronaut/micronaut-data-multithreading-bug
I also did an ad hoc test with a
BeanCreatedEventListener<TransactionManagerConfiguration>
listener to setenforceReadOnly
to true (in addition to setting thereadOnly
flag previously mentioned), but without any luck.If more information is needed, please let me know.
I'll appreciate any clarification/help on this, thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions