You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Francesco Iadanza <fr...@gmail.com> on 2010/05/12 11:15:32 UTC

Memory Leak with org.apache.openejb.client.RemoteInitialContextFactory.logout()

I've got more details about RemoteInitialContextFactory.logout()
RemoteInitialContextFactory extends JNDIContext and it has an empty logout()
method.
This leads to a possible memory leak. In fact, when using
TomcatSecurityService (or maybe any other SecurityService) in conjunction
with RemoteInitialContextFactory, a logout invocation is not propagated to
the AbstractSecurityService.logout(), so its identities Map is *never
emptied*.

I hope this helps
Thanks
Francesco




2010/5/11 Francesco Iadanza <fr...@gmail.com>

> Hi all,
> is there a way to do a logoff
> using org.apache.openejb.client.RemoteInitialContextFactory ? A simple
> InitialContext.close() doesn't work.
>
> I use OpenEJB in production environment, using Tomcat as server and I
> expose a remote SLSB with basic Tomcat authentication.
>
> I see that stressing remote invocation of methods that require
> authentication, I get
> org.apache.openejb.tomcat.catalina.TomcatSecurityService$TomcatUser
> org.apache.catalina.realm.GenericPrincipal
> org.apache.openejb.core.security.AbstractSecurityService$Identity
>
> instances growing up until an OutOfMemoryException
>
> Thanks for your support
> Francesco
>
>
>

Re: Memory Leak with org.apache.openejb.client.RemoteInitialContextFactory.logout()

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Sure it helps!

Can you fill a JIRA?
It would be awesome if you could provide a patch as well.
I'll be more than happy to review it and check it in for you.

Thanks.
Jean-Louis



Francesco Iadanza wrote:
> 
> I've got more details about RemoteInitialContextFactory.logout()
> RemoteInitialContextFactory extends JNDIContext and it has an empty
> logout()
> method.
> This leads to a possible memory leak. In fact, when using
> TomcatSecurityService (or maybe any other SecurityService) in conjunction
> with RemoteInitialContextFactory, a logout invocation is not propagated to
> the AbstractSecurityService.logout(), so its identities Map is *never
> emptied*.
> 
> I hope this helps
> Thanks
> Francesco
> 
> 
> 
> 
> 2010/5/11 Francesco Iadanza <fr...@gmail.com>
> 
>> Hi all,
>> is there a way to do a logoff
>> using org.apache.openejb.client.RemoteInitialContextFactory ? A simple
>> InitialContext.close() doesn't work.
>>
>> I use OpenEJB in production environment, using Tomcat as server and I
>> expose a remote SLSB with basic Tomcat authentication.
>>
>> I see that stressing remote invocation of methods that require
>> authentication, I get
>> org.apache.openejb.tomcat.catalina.TomcatSecurityService$TomcatUser
>> org.apache.catalina.realm.GenericPrincipal
>> org.apache.openejb.core.security.AbstractSecurityService$Identity
>>
>> instances growing up until an OutOfMemoryException
>>
>> Thanks for your support
>> Francesco
>>
>>
>>
> 
> 

-- 
View this message in context: http://openejb.979440.n4.nabble.com/Memory-Leak-with-org-apache-openejb-client-RemoteInitialContextFactory-logout-tp2195794p2195810.html
Sent from the OpenEJB User mailing list archive at Nabble.com.