2

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 ?

Suraj
  • 437
  • 8
  • 20
  • possible duplicate of [Encountered a deprecated javax.persistence.spi.PersistenceProvider](http://stackoverflow.com/questions/21693139/encountered-a-deprecated-javax-persistence-spi-persistenceprovider) – oschlueter Mar 17 '14 at 09:59

1 Answers1

1

org.hibernate.cfg.Configuration has been deprecated in this release and org.hibernate.cfg.AnnotationConfiguration has been deprecated for some time now. Both will get removed before 4.0.0 goes Final. We are still planning exactly what the replacement for org.hibernate.ejb.Ejb3Configuration will 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