• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Problem with entityManagerFactoryBean.setPersistenceProviderClass

 
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a previous project I have in a class

HibernatePersistence is flagged as deprecated but it worked.  In a new project i could not import org.hibernate.ejb.HibernatePersistence. I read that it is better to use HibernatePersistenceProvider but now I cannot import org.hibernate.jpa.HibernatePersistenceProvider. I have spend hours to find what dependency I should use in Mave without any results.
 
Saloon Keeper
Posts: 26532
187
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, if you're willing to define one externally, here's something that I use. Note that this is Hibernate JPA, not legacy Hibernate, and that the connection pool information is supplied external to the webapp via JNDI:


This setup is designed to inject EntityManagers directly into the DAOs used by the webapp via their @PersistenceContext annotations. It's a little old, so there may be some cruft and/or anachronisms in it, but it worked last time I deployed with it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic