2 Replies Latest reply on Dec 8, 2002 2:31 AM by CL Gilbert

    ejbCreate(String name) return value?

    CL Gilbert Newbie

      What should I return from my CMP bean class? The home interfaces are returning the actual instance, but what does the bean return to the home interface?

      I have Mastering EJB in which he returns a primary Key from his bean implementation class. Then at times I have seen null returned. Does the container expect me to return something here, since its not demanding anything and I am getting no compiling errors regardless of what I try.

      public void ejbCreate(String name) {
      }
      or

      public MyPK ejbCreate(String name) {
      return new MyPK(somevalue);
      }

      which of these is proper for a CMP Entity bean?