Results 1 to 3 of 3

Thread: LazyInitialization with EJBs

  1. #1
    Join Date
    Aug 2004
    Location
    Vrhnika, Slovenia
    Posts
    133

    Default LazyInitialization with EJBs

    Is it possible or not to use (Hibernate) lazy approach (OpenSessionInViewInterceptor) when accessing data with EJB Session object (local)?

    From what I understood from 'Hibernate in Action' (and my understandment (not a great one :oops of EJB's) you cannot use this approach.

    But what does then this thread say (http://forum.springframework.org/showthread.php?t=9622)?

    Thanx for shining a little light on that, Ales 8)
    Last edited by robyn; May 14th, 2006 at 10:03 AM.

  2. #2
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    To be honest, I've never tried it, but I wouldn't know why it wouldn't work, provided that you're using session bean through a local interface. Local session beans have pass by reference semantics as opposed to old-fashioned remote session beans, that have pass by value semantics according to the spec.

    Anybody else?

  3. #3
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    It should work absolutely fine with local session beans, as Alef says. It may even work ok with remote beans in some containers, as they optimize the same-VM case...
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

Similar Threads

  1. single authentication for webapp and EJBs
    By kuzman in forum Security
    Replies: 1
    Last Post: Oct 10th, 2005, 05:44 PM
  2. Some Doubts regarding EJB's
    By rajesh_shiggaon in forum EJB
    Replies: 4
    Last Post: Aug 12th, 2005, 12:43 PM
  3. Replies: 4
    Last Post: May 4th, 2005, 07:16 AM
  4. Replies: 2
    Last Post: Jan 21st, 2005, 04:17 AM
  5. Replies: 1
    Last Post: Jan 9th, 2005, 09:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •