0 Replies Latest reply on Jun 2, 2007 7:08 PM by Dmitry Pisklov

    Lazy fetch with EJB

    Dmitry Pisklov Newbie

      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.