|
Is there any way to indicate that the SessionFactoryImpl that should be resolved is the one that is actually building the EntityRegion? Is there any callback that could do that resolution?
If not, a possible fix is to register the SessionFactoryImpl before building entity regions. Doing so would allow looking up a SessionFactory that may not be completely built yet. I'm not sure if that could cause problems.
Another possibility would be for org.hibernate.cache.infinispan.entity.EntityRegionImpl to implement SessionFactoryObserver. If so, it could be added to SessionFactoryImpl#observer and replication could be deferred to {EntityRegionImpl#sessionFactoryCreated. I'm not sure if Infinispan can build the entity region without replicating though.
|