5 Replies Latest reply on Jul 2, 2002 6:04 PM by Dain Sundstrom

    Should findByPrimaryKey follow an ejbLoad() ?

    Alice Newbie

      The code below is from CD example on JBoss site:

      CD oldCd = home.findByPrimaryKey(id);
      Integer dummy = oldCd.getId();
      // force loading

      CD is an entity bean's remote interface. My question is why we need to "force" ejbLoad by calling a method on the remote interface. When we "find" an entity bean instance, does it call ejbLoad before returning the instance? If not, should we always force this loading?

      Thanks for any answers.