I have a J2EE based application running on JBoss 4.0.5 EJB 3.  I have a Swing 
client which uses a stateless session bean to retrieve data from the database 
via an Entity Manager. All the EJBs are set to LAZY fetch.  When I try to 
access a child entry to a EJB (i.e. access the object representing the a row in 
another table), I get an error because the session is closed.

Now I know this is because the EJB is detached since the EntityManger was 
loaded in the J2EE container and serialized to my Java Swing client.  

My question is, are there any recommended ways to still use LAZY fetching but 
be able to access children of a current entity bean?  Any utility to reattach 
the EJB?  Any best practice?


Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992921#3992921

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992921
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to