1 Reply Latest reply on Feb 27, 2003 11:50 AM by bman917

    Local Interface getEJBLocalHome()

    aeros405

      I have a problem with a LocalInterface.
      My EJB 2.0 CMP-Bean has a finder Method to get a Collection of Objects.
      When I execute the finderMethod in my Home Interface I get a Collection of LocalObjects.
      I can get the PrimaryKey from them. but I can't call the getEJBLocalHome(). The method crashes with an Exception with the message "null".
      So I think my LocalInterfaces don't have a LocalHome or is there another possibility?
      How can I fix this error?

        • 1. Re: Local Interface getEJBLocalHome()
          bman917


          Local beans cannot be accessed by remote clients. They cannot be returned from a method either. So all accesses to a local entity bean should be done through a session bean. It is best to make a wrapper object. This wrapper object should have all the fields that a local entity bean should have. In a session bean you should put all the persisted values of your entity to this wrapper and pass this wrapper to the client.