Does openjpa claim to support it ?
Since EJBQL != SQL you would need to mutate the generated sql. In hibernate you can do that by:
implement Interceptor.onPrepareStatement(String sql)
write native queries directly instead (use @NamedSQLQuery and/or <sql-query>)
The JPA hint feature is for adding hints for the entityManager not the database. As far as I know you can only use SQL hints if you use native queries.
ah ok they have a very oracle specfic select hint.
we could/should add that at some point too.
btw. by using query.setComment you can put in hints that will work in the start of your sql.