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
The Micronaut Data Transaction manager has code that wires up timeout attributes on the @TransactionalAdvice / @Transactional annotations up through the transaction definition, but then it doesn't do anything if you're using the basic JDBC transaction manager. It does seem to plumb through for Hibernate, Mongo, and Spring, but not the vanilla JDBC one.
My workaround on 3.x is to proxy the DataSource like so:
By doing this, we are seeing timeouts actually work on the 3.x line. We plan to upgrade to 4.x soon and this will have to change because DataSourceUtils doesn't even exist in that code, but it'll be the same approach until this capability is natively introduced.
I might also suggest a bit of docs on timeouts, since it's not really covered today.
The text was updated successfully, but these errors were encountered:
Feature description
The Micronaut Data Transaction manager has code that wires up
timeout
attributes on the@TransactionalAdvice
/@Transactional
annotations up through the transaction definition, but then it doesn't do anything if you're using the basic JDBC transaction manager. It does seem to plumb through for Hibernate, Mongo, and Spring, but not the vanilla JDBC one.My workaround on 3.x is to proxy the
DataSource
like so:By doing this, we are seeing timeouts actually work on the 3.x line. We plan to upgrade to 4.x soon and this will have to change because
DataSourceUtils
doesn't even exist in that code, but it'll be the same approach until this capability is natively introduced.I might also suggest a bit of docs on timeouts, since it's not really covered today.
The text was updated successfully, but these errors were encountered: