djencks wrote:
> 
> Subject subject = getSpringAuthenticatedSubject();
> ContextManager.registerSubject(subject); //if the subject is cached in  
> a session this should only happen once when the subject is first  
> authenticated/constructed.
> 
> //the following should happen on every request
> ContextManager.setCallers(subject, subject);
> try {
> //process request
> } finally {
>    ContextManager.clearCallers();
> }
> 

Our custom Spring authenticator contains calls to ContextManager.login and
setCallers.  If we need to call setCallers for every request, then that
would explain this bug.  We only call it once, and don't call clearCallers,
so the subject is staying around in the original thread but subsequent
threads never get initialized properly.

Sounds like the proper solution is just a simple filter that does the
setCallers and clearCallers.  Thanks for all the help.

-- 
View this message in context: 
http://www.nabble.com/EJB---Web-App-losing-Subject-tp24485373s134p24502831.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.

Reply via email to