Hello my 2nd question to the group I read in HeadFirstEJB that finder methods that return Collections return an empty collection if nothing is found and do not throw a FinderException. Why then on page 398 is the method
public Collection findByGenre(String Genre) throws FinderException, RemoteException;
I have searched in the spec and not able to find clear definition for this, but it is mentioned in both single entity finder as well multi entity finder. Also it is mentioned for the select methods...
SCJP 1.6, SCJD, SCWCD, SCBCD.
Be nice to people on the way up cos, you'll need 'em on your way down - From somewhere I can't remember!
There are many reasons that would bring you errors in finding some entities in the database. So any find or select methods have to define finderException.
For example, your given primary key does not have a matching in the table, or you do not have authurization to retrieve that entity, or some other application exception occurs during find process, no matter what, the method will bring up the finderException, because after all, exception happens in the 'find' prcoess of the method.