/** * Construct and return a new session object, based on the default * settings specified by this Manager's properties. The session * id will be assigned by this method, and available via the getId() * method of the returned session. If a new session cannot be created * for any reason, return <code>null</code>. * * @exception IllegalStateException if a new session cannot be * instantiated for any reason * @deprecated */ public Session createSession() { return createSession(null); }
/** * Construct and return a new session object, based on the default * settings specified by this Manager's properties. The session * id will be assigned by this method, and available via the getId() * method of the returned session. If a new session cannot be created * for any reason, return <code>null</code>. * * @exception IllegalStateException if a new session cannot be * instantiated for any reason * @deprecated */ public Session createSession() { return createSession(null); }
/** * Return a new session object as long as the number of active * sessions does not exceed <b>maxActiveSessions</b>. If there * aren't too many active sessions, or if there is no limit, * a session is created or retrieved from the recycled pool. * * @exception IllegalStateException if a new session cannot be * instantiated for any reason */ public Session createSession() { if ((maxActiveSessions >= 0) && (sessions.size() >= maxActiveSessions)) throw new IllegalStateException (rb.getString(LogFacade.CREATE_SESSION_EXCEPTION)); return (super.createSession()); }
/* */ public Session createSession(String sessionId) /* */ { /* 284 */ if ((this.maxActiveSessions >= 0) && (this.sessions.size() >= this.maxActiveSessions)) /* */ { /* 286 */ this.rejectedSessions += 1; /* 287 */ throw new IllegalStateException(sm.getString("standardManager.createSession.ise")); /* */ } /* */ /* 291 */ return super.createSession(sessionId); /* */ } /* */
/** * Construct and return a new session object, based on the default * settings specified by this Manager's properties, using the specified * session id. * * IMPLEMENTATION NOTE: This method must be kept in sync with the * createSession method that takes no arguments. * * @param sessionId the session id to assign to the new session * * @exception IllegalStateException if a new session cannot be * instantiated for any reason * * @return the new session, or <code>null</code> if a session with the * requested id already exists */ public Session createSession(String sessionId) { if ((maxActiveSessions >= 0) && (sessions.size() >= maxActiveSessions)) throw new IllegalStateException (rb.getString(LogFacade.CREATE_SESSION_EXCEPTION)); return (super.createSession(sessionId)); } // END S1AS8PE 4817642
/** * Construct and return a new session object, based on the default * settings specified by this Manager's properties, using the specified * session id. * * IMPLEMENTATION NOTE: This method must be kept in sync with the * createSession method that takes no arguments. * * @param sessionId the session id to assign to the new session * * @exception IllegalStateException if a new session cannot be * instantiated for any reason * * @return the new session, or <code>null</code> if a session with the * requested id already exists */ @Override public Session createSession(String sessionId) { if ((maxActiveSessions >= 0) && (sessions.size() >= maxActiveSessions)) { rejectedSessions++; throw new IllegalStateException (rb.getString(LogFacade.TOO_MANY_ACTIVE_SESSION_EXCEPTION)); } return (super.createSession(sessionId)); } // END S1AS8PE 4817642
/** * Construct and return a new session object, based on the default * settings specified by this Manager's properties. The session * id will be assigned by this method, and available via the getId() * method of the returned session. If a new session cannot be created * for any reason, return <code>null</code>. * * @exception IllegalStateException if a new session cannot be * instantiated for any reason */ public Session createSession(String sessionId) { if ((maxActiveSessions >= 0) && (sessions.size() >= maxActiveSessions)) { rejectedSessions++; throw new IllegalStateException (sm.getString("standardManager.createSession.ise")); } return (super.createSession(sessionId)); }
/** * Construct and return a new session object, based on the default * settings specified by this Manager's properties. The session * id will be assigned by this method, and available via the getId() * method of the returned session. If a new session cannot be created * for any reason, return <code>null</code>. * * @exception IllegalStateException if a new session cannot be * instantiated for any reason */ public Session createSession(String sessionId, Random random) { if ((maxActiveSessions >= 0) && (sessions.size() >= maxActiveSessions)) { rejectedSessions++; throw MESSAGES.managerMaxActiveSessions(); } return (super.createSession(sessionId, random)); }
/** * Construct and return a new session object, based on the default * settings specified by this Manager's properties. The session * id will be assigned by this method, and available via the getId() * method of the returned session. If a new session cannot be created * for any reason, return <code>null</code>. * * @exception IllegalStateException if a new session cannot be * instantiated for any reason */ public Session createSession(String sessionId) { if ((maxActiveSessions >= 0) && (sessions.size() >= maxActiveSessions)) { rejectedSessions++; throw new IllegalStateException (sm.getString("standardManager.createSession.ise")); } return (super.createSession(sessionId)); }
/** * Construct and return a new session object, based on the default * settings specified by this Manager's properties. The session * id will be assigned by this method, and available via the getId() * method of the returned session. If a new session cannot be created * for any reason, return <code>null</code>. * * @exception IllegalStateException if a new session cannot be * instantiated for any reason */ @Override public Session createSession() { if ((maxActiveSessions >= 0) && (sessions.size() >= maxActiveSessions)) { rejectedSessions++; ((StandardContext)container).sessionRejectedEvent( maxActiveSessions); throw new IllegalStateException (rb.getString(LogFacade.TOO_MANY_ACTIVE_SESSION_EXCEPTION)); } return (super.createSession()); }