Code example for Session

Methods: isOpen

		Session session = this.sessionMap.get(key);
		// Check for dangling Session that's around but already closed. 
		// Effectively an assertion: that should never happen in practice. 
		// We'll seamlessly remove the Session here, to not let it cause 
		// any side effects. 
		if (session != null && !session.isOpen()) {
			session = null;
		return session;
	public Session getAnySession() {
		if (!this.sessionMap.isEmpty()) {
			return this.sessionMap.values().iterator().next();
		return null; 
	public void addSession(Session session) {
Connect your IDE to all the code out there  Get Codota for Java