Is there a better way to know whether an entity bean exists other than trying a finder and catching a FinderException ? (I dont like the idea of having an exception for an unexceptional state)
Collection findAllByXXX(Integer xxx) throws FinderException;
....
if (c.size() > 0) {
entity exists...
} else {
...not
}
Or in EJB 2.1 use COUNT in a ejbSelect if you will not need the entity after checking.