use of org.apereo.cas.configuration.model.support.jpa.JpaConfigDataHolder in project cas by apereo.
the class GoogleAuthenticatorJpaConfiguration method googleAuthenticatorEntityManagerFactory.
@Lazy
@Bean
public LocalContainerEntityManagerFactoryBean googleAuthenticatorEntityManagerFactory() {
final LocalContainerEntityManagerFactoryBean bean = Beans.newHibernateEntityManagerFactoryBean(new JpaConfigDataHolder(jpaGoogleAuthenticatorVendorAdapter(), "jpaGoogleAuthenticatorContext", jpaPackagesToScanGoogleAuthenticator(), dataSourceGoogleAuthenticator()), casProperties.getAuthn().getMfa().getGauth().getJpa().getDatabase());
bean.getJpaPropertyMap().put("hibernate.enable_lazy_load_no_trans", Boolean.TRUE);
return bean;
}
use of org.apereo.cas.configuration.model.support.jpa.JpaConfigDataHolder in project cas by apereo.
the class JdbcMultifactorAuthnTrustConfiguration method mfaTrustedAuthnEntityManagerFactory.
@Lazy
@Bean
public LocalContainerEntityManagerFactoryBean mfaTrustedAuthnEntityManagerFactory() {
final LocalContainerEntityManagerFactoryBean bean = Beans.newHibernateEntityManagerFactoryBean(new JpaConfigDataHolder(jpaMfaTrustedAuthnVendorAdapter(), "jpaMfaTrustedAuthnContext", jpaMfaTrustedAuthnPackagesToScan(), dataSourceMfaTrustedAuthn()), casProperties.getAuthn().getMfa().getTrusted().getJpa());
bean.getJpaPropertyMap().put("hibernate.enable_lazy_load_no_trans", Boolean.TRUE);
return bean;
}
use of org.apereo.cas.configuration.model.support.jpa.JpaConfigDataHolder in project cas by apereo.
the class JpaEventsConfiguration method eventsEntityManagerFactory.
@Lazy
@Bean
public LocalContainerEntityManagerFactoryBean eventsEntityManagerFactory() {
final LocalContainerEntityManagerFactoryBean bean = Beans.newHibernateEntityManagerFactoryBean(new JpaConfigDataHolder(jpaEventVendorAdapter(), "jpaEventRegistryContext", jpaEventPackagesToScan(), dataSourceEvent()), casProperties.getEvents().getJpa());
bean.getJpaPropertyMap().put("hibernate.enable_lazy_load_no_trans", Boolean.TRUE);
return bean;
}
Aggregations