3 Replies Latest reply on Jul 19, 2002 12:38 PM by Peter Hall

    How to implement "*EJB implements EJBObject"

    John-Luc Bakker Newbie


      JBOSS 3.0.0

      I am reasonably new to EJB so I may have the wrong approach here. Please bear with me ...

      I have a table with a PK and need to ensure the PK is unique. The table contains users. I think I want to define a method on the home interface that finds a PK (a user ID) that is not in use and claims it:

      public User findByFreeUserID(...) { ... }

      Next, I create a "UserEJB implements EJBObject" that has the body for ejbFindByFreeUserID(...).

      However, now I also need to implement methods such as EJBObject.getEJBHome()! Is this the right approach? If so, is there a canonical implementation for getEJBHome() and the other methods on EJBObject?

      Many thanks,