What is the difference between Seam Managed Persistence and EJB managed Persistence Context?

 

smpc.bmp

  • Transactional scoped EJB Persistence Context is bound to EJB transaction. You may get lazyinitializationexception when you try to display JPA lazy initialized properties in the next JSF page.
  • Extended Persistence Context is bound to EJB Stateful session bean. You will not get lazyinitializationexception. 
  • Seam Managed Persistence Context can be used in POJO while EJB managed PC is only available in EJB.  SMPC is default conversion scope.   You don’t have to worry about the Lazyinitializationexception when you try to display JPA lazy initialized properties in the next JSF page.