Discuss this tutorial. Printable version (PDF).
Go to Contents page. Go to previous page. Go up a level. Go to next page.

 

Design


OTN developers wanted to give FBS users a way to retrieve forgotten user names and passwords. The FBS stores user account data in the database, so the developers defined a findByEmail method based on an EJB QL query. Given an email address, this method returns a UserAccount object, and the developers wrote code to parse the object and email the user name and/or password to the user.

This aproach adds the desired functionality to the FBS with a minimum of effort on the developers' part. The biggest task is to define the query in ejb-jar.xml. At deployment time, the container (OC4J) generates the code to implement findByEmail (and the interfaces that expose it to clients) based on the EJB QL query.

To watch a viewlet that shows how the FBS uses EJB QL, browse to:


Discuss this tutorial. Printable version (PDF).
Go to Contents page. Go to previous page. Go up a level. Go to next page.
E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy