[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Lazy fetch with EJB

Black Raven do-not-reply at jboss.com
Sat Jun 2 19:08:41 EDT 2007


I have EJB (stateful session) deployment in my JBoss server, which proxies data access via hibernate. So session management is on server side. Bean is used for accessing data from GUI client. 

How I can use lazy fetching in this configuration? Or how I can change configuration to use it?

When I try not to write default-lazy="false" in my mappings, on first access to my entities I have exception because of closed (not available) session. As quick-fix, I using local session for fetching data, and bean for manipulating data. But it's wrong, of course...

And I can't avoid using lazy fetching - too big data massives are to fetch from database otherwise.

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

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



More information about the jboss-user mailing list