Hello Community,
we are using spring with JPA and will migrate to Hibernate 4.3 as soon as released. For research, I set version to 4.3.0.Beta1 and saw, that Ejb3Configuration class has been removed. We used this class to register an Interceptor and custom user types via HibernatePersistence class:
Code:
public EntityManagerFactory createEntityManagerFactory(
String persistenceUnitName, Map properties) {
Ejb3Configuration cfg = new Ejb3Configuration();
Ejb3Configuration configured = cfg.configure(persistenceUnitName,
properties);
registerUserTypes(userTypes, cfg.getHibernateConfiguration());
registerInterceptor(interceptor, cfg.getHibernateConfiguration());
return configured != null ? configured.buildEntityManagerFactory()
: null;
}
Can someone tell me, what's the correct way to achieve this with Hibernate 4.3?
Thank you!