Invoking the getCallerPrincipal and isCallerInRole methods is disallowed in
the message-driven bean methods because the Container does not have a client security context.
The Container must throw and log the java.lang.IllegalStateException if
either of these methods is invoked.
EJB QL, like SQL, treats the FROM clause as a cartesian product. The FROM clause is similar to that of
SQL in that the declared identification variables affect the results of the query even if they are not used
in the WHERE clause. The Bean Provider should use caution in defining identification variables
because the domain of the query can depend on whether there are any values of the declared type.
For example, the FROM clause below defines a query over all orders that have line items and existing
products. If there are no Product instances in the persistent store, the domain of the query is empty and
no order is selected.
FROM Order AS o, IN(o.lineItems) l, Product p