• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

@PersistenceContext

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have a JAR file that contains DAO and DAOImpl classes. We have one
abstract BaseDAOImpl class that creates EntityManager instance
variables via @PersistenceContext.

When this JAR file gets packaged up in a WAR file with jersey services
and other code all is fine.


When this JAR file gets packaged into an EAR with an EJB jar file the
EntityManagers are always null.

I would imagine this isn't a completely unusual use case. Has anyone
run into / overcome this sort of thing? We happen to be using glassfish.

When the EAR is deployed we see hibernate find all of the persistence
units its just at runtime we can't get the EMs built.
 
reply
    Bookmark Topic Watch Topic
  • New Topic