Using EJB query

The Enterprise JavaBeans (EJB) query language is used to specify a query over container-managed entity beans. The language is similar to structured query language (SQL). An EJB query is independent of the bean's mapping to a persistent store.

About this task

An EJB query can be used in three situations:
  • To define a finder method of an EJB entity bean.
  • To define a select method of an EJB entity bean.
  • To dynamically specify a query using the executeQuery() dynamic API.
Finder and select queries are specified in the bean's deployment descriptor using the <ejb-ql> tag; they are compiled into SQL during deployment. Dynamic queries are included within the application code itself.

WebSphere Application Server's EJB query language is compliant with the EJB QL defined in Sun's EJB 2.1 specification and has additional capabilities as listed in the topic Comparison of EJB 2.x specification and WebSphere Query Language.

Procedure

Example

See the topic Example: EJB queries.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Sep 20, 2010 9:00:59 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=vela&product=was-nd-dist&topic=tque_ep
File name: tque_ep.html