In addition, the developer can use EJB QL to navigate to both locally defined and remote entity beans and dependent objects. The developer also has the option of traversing the abstract schema of any bean that is defined in the same EJB jar file. Find and Select Methods Select methods are a new addition in EJB 2.0. They are special-purpose finder methods defined by the bean provider within a CMP entity bean instance. A developer writes them as abstract methods in the entity bean's implementation class and defines their semantics with an EJB QL query string.
Select methods differ from finder methods in several ways.
They are not specified in the entity bean's home interface and are therefore not available to client invocations. Rather, these methods are to be used by the bean developer internally as components of that bean's business logic. The select methods a developer creates may return single or multiple values. If a select method is defined as returning only a single value, the bean developer must take care to define the query appropriately. Should the method return multiple values, the Persistence Manager will throw a FinderException.