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