[hibernate-dev] Should the TransactionSynchronizationRegistry be cached by the JtaPlatform or perhaps at the SessionFactory level?
Scott Marlow
smarlow at redhat.com
Wed Nov 28 15:58:41 EST 2018
Hi,
I started working on a WildFly change WFLY-11243 [1] to cache the
TransactionSynchronizationRegistry inside of the WildFly JtaPlatform
instance. The purpose of caching the TransactionSynchronizationRegistry
is to avoid repeated JndiService.locate() calls, like during entity
manager creation time [2] and other uses as well.
My question is whether the idea of caching the
TransactionSynchronizationRegistry instance is already handled at the
session factory level? If not, would that make sense?
[3] is the WildFly pr to cache the TransactionSynchronizationRegistry
instance, to avoid repeatedly looking it up (since it rarely ever
changes). If there is a way to instead have the
TransactionSynchronizationRegistry cached at the SF level, that might be
better.
Scott
[1] https://issues.jboss.org/browse/WFLY-11243
[2] https://paste.fedoraproject.org/paste/kXHq27RpSSs8GS8v0S8Dog
[3] https://github.com/wildfly/wildfly/pull/11784
More information about the hibernate-dev
mailing list