You can specify EclipseLink query hints (JPA query extensions) by:
Using the @QueryHint annotation
Including the hints in the orm.xml or eclipselink-orm.xml file
Using the setHint() method when executing a named or dynamic query (JPQL or Criteria)
EclipseLink supplies the following query hints:
All EclipseLink query hints are defined in the QueryHints class in the org.eclipse.persistence.config package. When you set a hint, you can set the value using the public static final field in the appropriate configuration class in org.eclipse.persistence.config package, including the following:
HintValues
CacheUsage
PessimisticLock
QueryType
For more information, see Section 10.3.1 "NamedQuery Annotation" in the JPA Specification (http://jcp.org/en/jsr/detail?id=317).