EJB Query

The EJB query language is used to specify a query over container-managed entity beans. The language is similar to SQL. An EJB query is independent of the bean's mapping to a persistent store. An EJB query can be used in three situations:

Finder and select queries are specified in the bean's deployment descriptor using the <ejb-ql> tag. Queries specified in the deployment descriptor are compiled into SQL during deployment. Dynamic queries require the interface provided by WAS Enterprise.

WAS's EJB query language is compliant with the EJB QL defined in Sun's EJB 2.0 specification. For more information about its capabilities, see Comparison of EJB 2.0 specification and WebSphere Query Language.

In your WAS application, you can define an EJB query using the following tools:

Before using EJB query, familiarize yourself with query language concepts, starting with the topic, EJB Query Language.