myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Arnošt <pavel.arn...@loutka.cz>
Subject Re: Memory leak?
Date Wed, 18 Jul 2012 07:25:38 GMT
Thanks, I think I found it in:

FacesContextImpl.release():

        _facesContextFactory = null;
        _renderKitFactory = null;
        _partialViewContextFactory = null;

        if (_facesContextFactory != null)
        {
            _facesContextFactory.release();
            _facesContextFactory = null;
        }

(_facesContextFactory is set to null and then tested for null).

I filed a bug report at https://issues.apache.org/jira/browse/MYFACES-3585.

Regards,
Pavel

2012/7/13 Rohit Kelapure <kelapure@gmail.com>:
> The way to fix this is to find out what MyFaces code is putting the
> ServletExternalContextImpl on the Threadlocal and
> not cleaning it up after the request ends.
>
> -cheers,
> ROhit
>
> On Thu, Jul 12, 2012 at 3:26 PM, Pavel Arnošt <pavel.arnost@loutka.cz> wrote:
>> Hi,
>>
>> I have very simple setup of Tomcat 7.0.29 and MyFaces 2.1.8 and when I
>> reload application, I see:
>>
>> VII 12, 2012 9:21:49 ODP. org.apache.catalina.loader.WebappClassLoader
>> checkThreadLocalMapForLeaks
>> SEVERE: The web application [/evidence] created a ThreadLocal with key
>> of type [java.lang.ThreadLocal] (value
>> [java.lang.ThreadLocal@1529c06]) and a value of type
>> [org.apache.myfaces.context.servlet.ServletExternalContextImpl] (value
>> [org.apache.myfaces.context.servlet.ServletExternalContextImpl@fd6c78])
>> but failed to remove it when the web application was stopped. Threads
>> are going to be renewed over time to try and avoid a probable memory
>> leak.
>>
>> Message is repeated several times. The more I use the JSF application,
>> the more messages I see.
>>
>> Is there a way how can I fix it?
>>
>> Thanks,
>> Regards
>> Pavel

Mime
View raw message