1 package org.wamblee.support.persistence.hibernate;
5 import org.dbunit.dataset.filter.ITableFilterSimple;
6 import org.wamblee.support.persistence.JpaCustomizer;
7 import org.wamblee.support.persistence.PersistenceUnitDescription;
9 public class HibernateJpaCustomizer implements JpaCustomizer {
11 public HibernateJpaCustomizer() {
16 public void customize(PersistenceUnitDescription aPersistenceUnit, Map<String, String> aJpaProperties) {
17 // Hibernate: Override transaction type and datasource
18 aJpaProperties.put("javax.persistence.transactionType", "RESOURCE_LOCAL");
19 aJpaProperties.put("javax.persistence.jtaDataSource", null);
20 aJpaProperties.put("javax.persistence.nonJtaDataSource", aPersistenceUnit.getJndiName());
22 // Hibernate schema generation
23 aJpaProperties.put("hibernate.hbm2ddl.auto", "create");
27 public ITableFilterSimple getJpaTables() {
28 return new HibernateTables();