// Construct search search criterion for executable token contexts;
// don't cache this, depends on current session.
PersistenceQuery query = pc.createQuery(TokenContext.class);
query.eq("lifecycleRequest", new Integer(LifecycleRequest.RESUME));
query.neq("lifecycleState", new Integer(LifecycleState.SELECTED));
query.addOrdering("priority");
int max = maxResults;
if (getIsolationLevel() == ISOLATION_LEVEL_SINGLE)
{