non findBy queries in home interface?

Discussions

EJB programming & troubleshooting: non findBy queries in home interface?

  1. non findBy queries in home interface? (4 messages)

    I have Mastering Enterprise JavaBeans version 2.0

    I thought that all queries made in the home interface had to start with 'findBy'

    however, this book has an example called

    int getTotalBankValue();

    i am assuming this is implemented by the container different right? can someone explain this to me?

    Threaded Messages (4)

  2. Home Business Method[ Go to top ]

    Hi Bob,

    getTotalBankValue() is Home business method, not the findBy method. You find matching 'ejbHome' prefix for these methodsin your bean class.

    Anil.
  3. ejb question[ Go to top ]

    what is the difference between a findBy method and a non-method that is a sql call? they look to be the same thing.
  4. ejb question[ Go to top ]

    findBy methods return only remote/local component interfaces. The home business methods return the any RMI/IIOP complaint data types.

    Anil.
  5. ejb question[ Go to top ]

    The container will give the implementation of the finBy method and there won't be any corresponding method in the bean class. Where as for the other home business methods there has to be a 'ejbHome<homeMethodName>' method.

    The home business methods are for when you need to do something with the bunch of records and not one .

    hope that helps