You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Manuel Blechschmidt (JIRA)" <ji...@apache.org> on 2015/09/04 08:29:45 UTC

[jira] [Commented] (OLINGO-754) MemoryLeak when using Olingo in Wildfly

    [ https://issues.apache.org/jira/browse/OLINGO-754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14730379#comment-14730379 ] 

Manuel Blechschmidt commented on OLINGO-754:
--------------------------------------------

[~chandan.v.a]  can you explain to me why this setContextInThreadLocal is necessary?

I am using a full blown Java EE application server (wildfly 8.2) and my EntityManager is managed by the application this code creates a leak of 300kb for every request that is send to the server. Further there is no way for me to disable this behavior.

> MemoryLeak when using Olingo in Wildfly
> ---------------------------------------
>
>                 Key: OLINGO-754
>                 URL: https://issues.apache.org/jira/browse/OLINGO-754
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 2.0.4
>         Environment: java 8, wildfly 8.2, Linux
>            Reporter: Manuel Blechschmidt
>
> The following code produces a memory leak in an application server:
> {code:title=org.apache.olingo.odata2.jpa.processor.core.ODataJPAContextImpl}
>   @Override
>   public void setODataContext(final ODataContext ctx) {
>     odataContext = ctx;
>     // This produces a memory leak on wildfly
>     setContextInThreadLocal(odataContext);
>   }
> {code}
> I removed the setContextInThreadLocal and it worked afterwards. I searched the whole code how this variable is normaly removed but was not able to find the clean way to solve this problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)