Class DisabledSessionException

  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.shiro.ShiroException
                  extended by org.apache.shiro.session.SessionException
                      extended by
All Implemented Interfaces:

public class DisabledSessionException
extends SessionException

Exception thrown if attempting to create a new Subject session, but that Subject's sessions are disabled.

Note that this exception represents an invalid API usage scenario - where Shiro has been configured to disable sessions for a particular subject, but a developer is attempting to use that Subject's session.

In other words, if this exception is encountered, it should be resolved by a configuration change for Shiro and not by checking every Subject to see if they are enabled or not (which would likely introduce very ugly/paranoid code checks everywhere a session is needed). This is why there is no subject.isSessionEnabled() method.

See Also:
Serialized Form

Constructor Summary
DisabledSessionException(String message)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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


public DisabledSessionException(String message)

Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.