private void returnSession() { try { sessionPool.returnObject(session); } catch (Exception e) { for (ISessionCallback<R> handler : configuration.getSessionCallbacks()) { handler.onFailure(new DiagnosisEngineException("Failed to return Session to ObjectPool.", e)); } } } });