/** * INTERNAL: * ObjectLevelReadQueries now have an explicit pre-prepare stage, which * is for checking for pessimistic locking, and computing any joined * attributes declared on the descriptor. */ protected void checkPrePrepare(AbstractSession session) { // This query is first prepared for global common state, this must be synced. if (!this.isPrePrepared) {// Avoid the monitor is already prePrepare, must check again for concurrency. synchronized (this) { if (!isPrePrepared()) { AbstractSession alreadySetSession = getSession(); setSession(session);// Session is required for some init stuff. prePrepare(); setSession(alreadySetSession); setIsPrePrepared(true);// MUST not set prepare until done as other thread may hit before finishing the prePrepare. } } } else { // Must always check descriptor as transient for remote. checkDescriptor(session); } }
if (!isPrePrepared()) { AbstractSession alreadySetSession = getSession();
if (!isPrePrepared()) { AbstractSession alreadySetSession = getSession();