This is a fundamental question of paramount importance to EJB 3.0 entity bean 
development. EJB 3.0 keeps it simple and loads everything. You can take a 
different tack and lazy load everything for maximum performance. 

When you get an exception such as yours, you can analyze the situation. If that 
item is accessed with high frequency then mark it as eager. If access to that 
information is infrequent, mark it as lazy and add a session bean method to 
explicitly populate those fields from its entity manager.  

Having default lazy loading with magical remote loading would be nice but what 
entity manager would it use? Also, you would then have to remote the business 
logic that may or may not be applied at load time. 

It would be useful if an official WHEN-TO was published for lazy/eager but I 
think I am on the right track with my comments. Just starting to use EJB 3.0 
myself. 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3927972


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to