PooledSession session;
try {
session = sessionPool.borrowObject(key);
} catch (Exception e) {
IllegalStateException illegalStateException = new IllegalStateException(e.toString());
illegalStateException.initCause(e);
throw illegalStateException;
}
return session;
}