Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 22937 invoked from network); 15 Jul 2009 17:52:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Jul 2009 17:52:49 -0000 Received: (qmail 89621 invoked by uid 500); 15 Jul 2009 17:52:58 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 89574 invoked by uid 500); 15 Jul 2009 17:52:58 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 89566 invoked by uid 99); 15 Jul 2009 17:52:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jul 2009 17:52:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jul 2009 17:52:47 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MR8eY-0004gb-K8 for user@geronimo.apache.org; Wed, 15 Jul 2009 10:52:26 -0700 Message-ID: <24502831.post@talk.nabble.com> Date: Wed, 15 Jul 2009 10:52:26 -0700 (PDT) From: Kory Markevich To: user@geronimo.apache.org Subject: Re: EJB & Web App losing Subject In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: Kory_Markevich@ACL.com References: <24485373.post@talk.nabble.com> <24487458.post@talk.nabble.com> <3203679B-8142-4BB8-A767-B8AF8BBF3F16@yahoo.com> <24502397.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org 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.