On Wed, Jun 13, 2012 at 5:27 PM, Thilo-Alexander Ginkel <[email protected]> wrote: > I have a web application that sets up Shiro using Shiro Guice based on > a ShiroWebModule. Most of the time, Shiro is used for authenticating > and authorizing web requests. However, there is also an instance of a > Quartz Scheduler running, which executes jobs that interact with > services that perform authz checks (based on Shiro's annotations). > [...] > > Unfortunately, when building the Subject, Shiro complains about the > session not being web-based (which is IMHO ok as this is done from a > background job, which neither needs a permanent session, nor is any > web request involved in its execution): > > java.lang.IllegalArgumentException: SessionContext must be an HTTP > compatible implementation.
After switching over to DefaultWebSessionManager (by overriding ShiroWebModule#bindSessionManager) everything is now working as expected. Thanks, Thilo
