I am usingg Hibernate EntityManager with Glassfish and I have configured the datasource with transaction type JTA . I have a relationship Customer->Order which I have specified a lazy. I am showing this in JSP (JSF ) pages. The architecture is JSF->Managed Bean -> Local (Stateless) Session Bean -> JPA (Hibernate EM)
My problem is that when I fetch the Customer (in a transaction), I can see the returned Set for order is 'CGLIB Enhanced'. If I now iterate over this collection in Managed Bean (the transaction has ended, I am not using opensessionview) , I see that hibernate issues a query (show_sql) instead of throwing the expected LazyInitialization exception.
|