@Factory
public class DataEntityManagerFactoryBean
extends java.lang.Object
StandardServiceRegistry
configured by EntityManagerFactoryBean
, decoupling it from Spring transaction management.Constructor and Description |
---|
DataEntityManagerFactoryBean(io.micronaut.configuration.hibernate.jpa.JpaConfiguration jpaConfiguration,
io.micronaut.context.BeanLocator beanLocator) |
Modifier and Type | Method and Description |
---|---|
protected org.hibernate.boot.registry.StandardServiceRegistry |
hibernateStandardServiceRegistry(java.lang.String dataSourceName,
javax.sql.DataSource dataSource)
Builds the
StandardServiceRegistry bean for the given DataSource . |
public DataEntityManagerFactoryBean(io.micronaut.configuration.hibernate.jpa.JpaConfiguration jpaConfiguration, io.micronaut.context.BeanLocator beanLocator)
jpaConfiguration
- The JPA configurationbeanLocator
- The bean locator@EachBean(value=javax.sql.DataSource.class) @Replaces(factory=io.micronaut.configuration.hibernate.jpa.EntityManagerFactoryBean.class, bean=org.hibernate.boot.registry.StandardServiceRegistry.class) @Requires(missingClasses="org.springframework.orm.hibernate5.HibernateTransactionManager") protected org.hibernate.boot.registry.StandardServiceRegistry hibernateStandardServiceRegistry(@Parameter java.lang.String dataSourceName, javax.sql.DataSource dataSource)
StandardServiceRegistry
bean for the given DataSource
.dataSourceName
- The data source namedataSource
- The data sourceStandardServiceRegistry