Hello, I got a Problem with ejb3 stateless-session beans, @ejb injection and the persistence context. The setup is this: 1) a stateless-session-bean that is a session-facade 2) a stateless-session-bean that is a dao 3) the session-fascade uses the dao (includes it with a @EJB annotation)
no transaction annotations are used The problem is as follows: 1) a call to the session-fascade is made 2) the session fascade makes a call on the dao, in order to load an ejb3-entity-bean. this entity bean includes a collection that is lazy loaded. 3) the entity bean is loaded an returned to the session fascade 4) the session fascade tries to access the lazy-collection of the entity-bean -> this results in a org.hibernate.LazyInitializationException this looks like the persistent-context is not the same in the session-fascade and the dao. but since no transaction annotations are used in the session beans, I think the persistent context should be the same, shouldn't it? when i do not use the @EJB injection, but look up the dao in jndi myself, i can access the lazy-collection. I thought that these two option should result in the same behaviour, shouldn't they? thanks for your help, cheers. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3944504#3944504 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3944504 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user