TooManyActiveSessionsException (Apache Tomcat 8.5.57 API Documentation)

org.apache.catalina.session

## Class TooManyActiveSessionsException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - java.lang.IllegalStateException
        - - org.apache.catalina.session.TooManyActiveSessionsException

- All Implemented Interfaces:
    Serializable

      public class TooManyActiveSessionsException
      extends IllegalStateException

  An exception that indicates the maximum number of active sessions has been reached and the server is refusing to create any new sessions.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TooManyActiveSessionsException(String message, int maxActive)` Creates a new TooManyActiveSessionsException.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getMaxActiveSessions()` Gets the maximum number of sessions allowed by the session manager.

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TooManyActiveSessionsException

          public TooManyActiveSessionsException(String message,
                                        int maxActive)

      Creates a new TooManyActiveSessionsException.
      Parameters:
        `message` - A description for the exception.
        `maxActive` - The maximum number of active sessions allowed by the session manager.

  - ### Method Detail

    - #### getMaxActiveSessions

          public int getMaxActiveSessions()

      Gets the maximum number of sessions allowed by the session manager.
      Returns:
        The maximum number of sessions allowed by the session manager.

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.