shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Les Hazlewood" <...@hazlewood.com>
Subject Re: ***UNCHECKED*** Testcase for NPE problem in JSecurity (was: Intermediate release of JSecurity Plugin 0.3-SNAPSHOT)
Date Thu, 04 Sep 2008 17:15:30 GMT
Do you think the ThreadContext.clear() method isn't sufficient enough?  Do
you still think it necessary to create a new instance?

On Thu, Sep 4, 2008 at 1:08 PM, Peter Ledbrook <peter@g2one.com> wrote:

> > I've made that change to ThreadContext and just committed it.  Peter,
> could
> > you please update and test it out to ensure that it is a valid solution
> (I
> > still have deployment problems with that .war and can't test it).  Also
> MO,
> > if you check out jsecurity's trunk, you could build and deploy the
> created
> > jsecurity-jdk14.jar file and see yourself.
> > Please let me know what happens.
> > Thanks,
> > Les
>
> Yup, that seems to work. Looking at the fix, that kind of makes sense.
> If the ThreadContext is initialised by the parent thread of all the
> request threads, then all the request threads will end up sharing the
> same hash map - bad news! In fact, we should probably be creating a
> new map every request and then removing it at the end. That's the
> normal approach for safely working with thread pools, I think.
>
> Cheers,
>
> Peter
>
> --
> Software Engineer
> G2One, Inc.
> http://www.g2one.com/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message