@Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory(final DataSource dataSource) { LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); em.setDataSource(dataSource); em.setPackagesToScan(new String[] { "com.ge.predix.acs.service.policy.admin.dao", "com.ge.predix.acs.privilege.management.dao", "com.ge.predix.acs.zone.management.dao", "com.ge.predix.acs.attribute.connector.management.dao" }); JpaVendorAdapter vendorAdapter = new OpenJpaVendorAdapter(); em.setJpaVendorAdapter(vendorAdapter); return em; }
@Bean public LocalContainerEntityManagerFactoryBean getEntityManagerFactoryBean(final DataSource dataSource) { final LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean(); factory.setDataSource(dataSource); factory.setJpaVendorAdapter(new OpenJpaVendorAdapter()); factory.setPersistenceUnitName("jwala-unit"); factory.setPersistenceXmlLocation("classpath:META-INF/persistence.xml"); return factory; }
@Bean public LocalContainerEntityManagerFactoryBean getEntityManagerFactoryBean() { final LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean(); factory.setJpaVendorAdapter(new OpenJpaVendorAdapter()); factory.setPersistenceXmlLocation("classpath:META-INF/test-persistence.xml"); factory.setDataSource(getDataSource()); factory.setJpaProperties(getJpaProperties()); return factory; }
@Bean @Qualifier("wte4j") public LocalContainerEntityManagerFactoryBean wteEntityManagerFactory() { LocalContainerEntityManagerFactoryBean emfFactoryBean = new LocalContainerEntityManagerFactoryBean(); emfFactoryBean.setDataSource(dataSource); emfFactoryBean.setJpaVendorAdapter(new OpenJpaVendorAdapter()); emfFactoryBean.setPersistenceUnitName("wte4j-templates"); return emfFactoryBean; }
@Bean @Qualifier("wte4j") public LocalContainerEntityManagerFactoryBean wteEntityManagerFactory() { LocalContainerEntityManagerFactoryBean emfFactoryBean = new LocalContainerEntityManagerFactoryBean(); emfFactoryBean.setDataSource(lookUpDataSource()); emfFactoryBean.setJpaVendorAdapter(new OpenJpaVendorAdapter()); emfFactoryBean.setPersistenceUnitName("wte4j-templates"); emfFactoryBean.setJpaPropertyMap(createJpaPropertyMap()); return emfFactoryBean; }
@Bean @Qualifier("wte4j") public LocalContainerEntityManagerFactoryBean wteEntityManagerFactory() { LocalContainerEntityManagerFactoryBean emfFactoryBean = new LocalContainerEntityManagerFactoryBean(); emfFactoryBean.setDataSource(dataSource()); emfFactoryBean.setJpaVendorAdapter(new OpenJpaVendorAdapter()); emfFactoryBean.setPersistenceXmlLocation("classpath:/test-persistence.xml"); emfFactoryBean.setPersistenceUnitName("wte4j-templates"); emfFactoryBean.setJpaPropertyMap(createJpaPropertyMap()); return emfFactoryBean; }
@Bean public JpaVendorAdapter getJpaVendorAdapter() { return new OpenJpaVendorAdapter(); }
public JpaVendorAdapter getSpringJpaVendorAdaptor() { return new OpenJpaVendorAdapter(); }