-
1. Re: Transaction does not commit before ajax rerender
gadeyne.bram Dec 19, 2011 9:32 AM (in response to gadeyne.bram)I've set up my DAO objects to use @PersistenceContext in stead of @In so I have better control on when transactions are commited.
If i'm correct then there is a
global
transaction by seam. This allows for easy lazyLoading of properties. If I get entities using a entityManager via @PersistenceContext then I get the following exception:org.hibernate.LazyInitializationException: could not initialize proxy - no Session
I guess this is because my statefull session bean receiving the entities has an other instance of a persistenceContext en so can nog lazy load dataproperties from my entities.
Any thoughts?
Is there a good way to use Container managed transactions together with Seam managed transactions? Or is there a way to commit a transaction using the seam transaction management?