In my web application, I am using Spring-Data and JPA/Hibernate.My senario is I have to create separate schema company wise.so I am taking username,password and companycode while login .Taking company code will help to find out scheme for that company.My database schema will change according to user logged in so in order to do that I have written hibernate interceptor as describe by http://blog.krecan.net/2009/01/24/spring-managed-hibernate-interceptor-in-jpa but since it is using org.hibernate.ejb.Ejb3Configuration which is going to be deprecated so can anyone tell me other alternative way ?
Asked
Active
Viewed 5,273 times
1 Answers
1
org.hibernate.cfg.Configurationhas been deprecated in this release andorg.hibernate.cfg.AnnotationConfigurationhas been deprecated for some time now. Both will get removed before 4.0.0 goes Final. We are still planning exactly what the replacement fororg.hibernate.ejb.Ejb3Configurationwill look like, but it too has been deprecated in the meantime
(the recommended way to build an EntityManagerFactory has always been via javax.persistence.Persistence anyway).
I am referring this blog post
Erwin Bolwidt
- 30,799
- 15
- 56
- 79
Suresh Atta
- 120,458
- 37
- 198
- 307