You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by "Angelo K. Huang" <an...@ymail.com> on 2010/06/19 02:32:01 UTC
What is DetachedStateManager? Memory Leak?
We used openjpa 1.2.1 in our application that run in Tomcat. One stress test
I am running is to request a large number of results back. The query part is
fine. However, when I dumped the memroy using jmap and jhat, I still could
see lots of objects stayed in the memory and referenced by
DetachedStateManager after a while. The entityManager is closed after the
queries. I am thinking those objects might not be garbage collected by JVM
and cause memory leak.
21001 instances of class org.apache.oozie.SLAEventBean
21000 instances of class org.apache.openjpa.kernel.DetachedStateManager
--
View this message in context: http://openjpa.208410.n2.nabble.com/What-is-DetachedStateManager-Memory-Leak-tp5197432p5197432.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: What is DetachedStateManager? Memory Leak?
Posted by Rick Curtis <cu...@gmail.com>.
First off, take a quick read through the user manual [1] to understand what
the DetachedState is all about. Second, you said that you could see these
objects sticking around for a while... were gc'd at some point? Once
SLAEventBean is gc'd the DetachedStateManager objects will go away.
Thanks,
Rick
[1]
http://openjpa.apache.org/builds/1.2.2/apache-openjpa-1.2.2/docs/manual/manual.html#ref_guide_detach_graph
On Fri, Jun 18, 2010 at 7:32 PM, Angelo K. Huang <an...@ymail.com> wrote:
>
> We used openjpa 1.2.1 in our application that run in Tomcat. One stress
> test
> I am running is to request a large number of results back. The query part
> is
> fine. However, when I dumped the memroy using jmap and jhat, I still could
> see lots of objects stayed in the memory and referenced by
> DetachedStateManager after a while. The entityManager is closed after the
> queries. I am thinking those objects might not be garbage collected by JVM
> and cause memory leak.
>
> 21001 instances of class org.apache.oozie.SLAEventBean
> 21000 instances of class org.apache.openjpa.kernel.DetachedStateManager
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/What-is-DetachedStateManager-Memory-Leak-tp5197432p5197432.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>