EntityManagerFactoryBuilderImpl contains field
private Object cdiBeanManager;
which can't be set. Value is used while building SessionFactoryBuilder:
protected void populate(SessionFactoryBuilder sfBuilder, StandardServiceRegistry ssr) {
if ( this.cdiBeanManager != null ) {
sfBuilder.applyBeanManager( cdiBeanManager );
}
}
Can EntityManagerFactoryBuilder be extended with
public EntityManagerFactoryBuilder withBeanManager(Object validatorFactory);
to allow setting this field. It will be useful to simplify integration with custom DI frameworks. |