1 Reply Latest reply on Nov 11, 2003 11:07 AM by jamesstrachan

    Referencing the home interface from the home interface...

    wesleyhall Newbie

      I have a question for all you knowledgable EJB coders out there.

      I am writing an entity bean and i want to place a business method in the home interface.

      The issue is that the code in this home interface method will need to access another home interface method (findByPrimaryKey). Is there a simple way to reference the home interface of an EJB from an ejbHomeXXX method?

      Thanks for any help.

        • 1. Re: Referencing the home interface from the home interface..
          jamesstrachan Newbie


          Both the first business method and ejbFindByPriomaryKey will be present as code within the entity bean.

          So you can call the ejbFind.. or any other method from your business method.

          But it feels a bit incestuous.

          Why not use a stateless session bean as a facade that can (a) invoke the business method on the home interface of the entity bean and then (b) invoke other methods depending on the results returned by the first method ?