• 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

Differences between "Container Managed" Entity Manager and "Application Managed" one

 
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for reading my post.

What are differences between "Container Managed" Entity Manager and "Application Managed" one?



When we are talking in context of EJB 3.0 and JPA.

Thanks
 
author
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As the name suggests, lifecycle of container-managed entity manager is managed by the container and you can use @PersistenceContext to inject an instance of EntityManager. However it's developer's responsibility is to manage the lifecycle of entity manager e.g. create an instance from entity manager factory, associate with a transaction and close it when you are done. Sorry for doing a plug for my book, we discuss this in Chapter 9 of the book!
 
reply
    Bookmark Topic Watch Topic
  • New Topic