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 DelegatingEventExternalizer currently uses @ApplicationModuleListener to asynchronously publish events to a broker on transaction commit. That said, @AML creates a transaction itself, which is unnecessary in this case as the listener solely interacts with infrastructure that's not transactional in the first place.
To avoid a connection unnecessarily being acquired, we should flip the transaction propagation to SUPPORTS, i.e., not actively creating a transaction but simply participating in one in case some infrastructure still creates one.
The text was updated successfully, but these errors were encountered:
We now use the ability to override transaction propagation introduce for GH-858 to tweak the application module listener declaration on DelegatingEventListener so that we do not create a transaction by default. This avoids a database connection being acquired as the listener is very likely to interact with a non-transactional resource anyway.
The
DelegatingEventExternalizer
currently uses@ApplicationModuleListener
to asynchronously publish events to a broker on transaction commit. That said,@AML
creates a transaction itself, which is unnecessary in this case as the listener solely interacts with infrastructure that's not transactional in the first place.To avoid a connection unnecessarily being acquired, we should flip the transaction propagation to
SUPPORTS
, i.e., not actively creating a transaction but simply participating in one in case some infrastructure still creates one.The text was updated successfully, but these errors were encountered: