/** * INTERNAL: * Override From session. Get the accessor based on the query, and execute call, * this is here for session broker. */ public Object executeCall(Call call, AbstractRecord translationRow, DatabaseQuery query) throws DatabaseException { Collection<Accessor> accessors = query.getSession().getAccessors(call, translationRow, query); query.setAccessors(accessors); try { return basicExecuteCall(call, translationRow, query); } finally { if (call.isFinished()) { query.setAccessor(null); } } }
/** * INTERNAL: * Override From session. Get the accessor based on the query, and execute call, * this is here for session broker. */ @Override public Object executeCall(Call call, AbstractRecord translationRow, DatabaseQuery query) throws DatabaseException { Collection<Accessor> accessors = query.getSession().getAccessors(call, translationRow, query); query.setAccessors(accessors); try { return basicExecuteCall(call, translationRow, query); } finally { if (call.isFinished()) { query.setAccessor(null); } } }
/** * INTERNAL: * Overridden by subclasses that do more than just execute the call. * Executes the call directly on this session and does not check which * session it should have executed on. */ public Object executeCall(Call call, AbstractRecord translationRow, DatabaseQuery query) throws DatabaseException { if (query.getAccessors() == null) { query.setAccessors(getAccessors()); } try { return basicExecuteCall(call, translationRow, query); } finally { if (call.isFinished()) { query.setAccessors(null); } } }
/** * INTERNAL: * Overridden by subclasses that do more than just execute the call. * Executes the call directly on this session and does not check which * session it should have executed on. */ public Object executeCall(Call call, AbstractRecord translationRow, DatabaseQuery query) throws DatabaseException { if (query.getAccessors() == null) { query.setAccessors(getAccessors()); } try { return basicExecuteCall(call, translationRow, query); } finally { if (call.isFinished()) { query.setAccessors(null); } } }
/** * INTERNAL: * Overridden by subclasses that do more than just execute the call. * Executes the call directly on this session and does not check which * session it should have executed on. */ public Object executeCall(Call call, AbstractRecord translationRow, DatabaseQuery query) throws DatabaseException { //** sequencing refactoring if (query.getAccessor() == null) { query.setAccessor(getAccessor()); } try { return query.getAccessor().executeCall(call, translationRow, this); } finally { if (call.isFinished()) { query.setAccessor(null); } } }
if (call.isFinished() || exception != null) { try { if (accessorAllocated) {
/** * INTERNAL: * Override From session. Get the accessor based on the query, and execute call, * this is here for session broker. */ public Object executeCall(Call call, AbstractRecord translationRow, DatabaseQuery query) throws DatabaseException { Accessor accessor; if (query.getSessionName() == null) { accessor = query.getSession().getAccessor(query.getReferenceClass()); } else { accessor = query.getSession().getAccessor(query.getSessionName()); } query.setAccessor(accessor); try { return query.getAccessor().executeCall(call, translationRow, this); } finally { if (call.isFinished()) { query.setAccessor(null); } } }
/** * INTERNAL: * Override to acquire the connection from the pool at the last minute */ public Object executeCall(Call call, AbstractRecord translationRow, DatabaseQuery query) throws DatabaseException { if (query.getAccessor() == null) { //if the connection has not yet been acquired then do it here. if (getAccessor() == null) { this.parent.acquireClientConnection(this); } query.setAccessor(getAccessor()); } try { return query.getAccessor().executeCall(call, translationRow, this); } finally { if (call.isFinished()) { query.setAccessor(null); } if(!isActive() && getAccessor() != null) { // the session has been already released and this query is likely instantiates a ValueHolder - // release exclusive connection right away, otherwise it may never be released. this.parent.releaseClientSession(this); } } }
if (call.isFinished() || exception != null) { if (accessorAllocated) { try {
if (call.isFinished() || exception != null) { if (accessorAllocated) { try {
exception = caughtException; } finally { if (call.isFinished() || exception != null) { query.setAccessors(null);
exception = caughtException; } finally { if (call.isFinished() || exception != null) { query.setAccessors(null);