A finder method is invoked through a CMP entity bean's (local or remote) home interface, and returns (local or remote) references to the entity beans that match an EJB QL query. This sample shows common finder methods, using EJB QL and WebLogic QL queries.
In the example, an ItemsBean_F EJB models the persistent data in a prefilled database table, representing an inventory of products. Each items has a product name, a quantity that is in stock, and a price. In addition, this EJB has an entity relationship with the ManufacturerBean_F EJB, which holds information about the various manufacturers known for these products. Each product has one manufacturer, and a manufacturer has multiple products. Various finder methods are used to obtain information about the records in the database tables.
Examining an EJB at runtime using a conversational web service via an EJB control.
The code of the CMP entity beans is located in the finderMethods folder of the EJBs project in the SamplesApp sample application. In the file system the location is:
BEA_HOME\weblogic81\samples\workshop\SamplesApp\EJBs\finderMethods
The web services that you run as a client application to test the EJBs, and the EJB controls that you use to locate and reference the EJBs, are located in the finderMethods folder of the EJBs_ClientApps project in the SamplesApp sample application. In the file system the location is:
BEA_HOME\weblogic81\samples\workshop\SamplesApp\EJBs_ClientApps\finderMethods
To Run the Sample
BEA_HOME/weblogic81/samples/workshop/startWebLogic.sh