Niko Wittenbeck opened SPR-16828 and commented
Hi there,
using Spring 5.0.6 and a custom LocalSessionFactoryBean for Hibernate 5, I'd like to register a Hibernate integrator progammatically. This needs to be done via BootstrapServiceRegistryBuilder#applyIntegrator.
In the LocalSessionFactory bean, BootstrapServiceRegistryBuilder is only aquired in getMetadataSources():
public MetadataSources getMetadataSources() {
(...)
BootstrapServiceRegistryBuilder builder = new BootstrapServiceRegistryBuilder();
(...)
this.metadataSources = new MetadataSources(builder.build());
}
return this.metadataSources;
}
This means, in order to simply apply an integrator, I have to override getMetadataSources to apply additional stuff to the BootstrapServiceRegistryBuilder. As private fields are used (metadataSourcesAccessed, metadataSources), ugly code duplication needs to be done.
So IMHO it would be great if the builder could easily be accessed in another way.
Affects: 5.0.6
Issue Links:
Referenced from: commits b6d9556
Niko Wittenbeck opened SPR-16828 and commented
Hi there,
using Spring 5.0.6 and a custom LocalSessionFactoryBean for Hibernate 5, I'd like to register a Hibernate integrator progammatically. This needs to be done via BootstrapServiceRegistryBuilder#applyIntegrator.
In the LocalSessionFactory bean, BootstrapServiceRegistryBuilder is only aquired in getMetadataSources():
This means, in order to simply apply an integrator, I have to override getMetadataSources to apply additional stuff to the BootstrapServiceRegistryBuilder. As private fields are used (metadataSourcesAccessed, metadataSources), ugly code duplication needs to be done.
So IMHO it would be great if the builder could easily be accessed in another way.
Affects: 5.0.6
Issue Links:
Referenced from: commits b6d9556