return ((Server)sharedSession).acquireClientSession();
}
if (sharedSession.isSessionBroker()) {
SessionBroker broker = (SessionBroker)sharedSession;
if (broker.isServerSessionBroker()) {
return broker.acquireClientSessionBroker();
}
return broker;
}
// Assume we have a database session and return it.
return sharedSession;