[rules-users] Memory leak in 5.2/5.3

Swindells, Thomas TSwindells at nds.com
Wed Sep 14 09:55:58 EDT 2011


This probably isn't very optimal but it should work:

Collection<FactHandle> factHandles = session.getFactHandles();
for(FactHandle f : factHandles) {
        session.retract(f);
}

Thomas
> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org [mailto:rules-users-
> bounces at lists.jboss.org] On Behalf Of vadlam
> Sent: 14 September 2011 02:39
> To: rules-users at lists.jboss.org
> Subject: Re: [rules-users] Memory leak in 5.2/5.3
>
>
> we are seeing similar memory leak with 5.2.0.Cr1 version of drools.
>
> are there any other alternatives such as using a different version of jbpm jar
> if that is the cause of the problem?
> we are currently using the jbpm-flow-5.1.0.Cr1.jar.
>
> If not,
>
> is there a method that removes all the facts from the ksession so that it can
> be reused?
>
> for ex, the existing code (simplified) is as follows:
>
> ksession = knowledgeBase.newStatefulKnowledgeSession();
>
> for (Object obj : objList)
>         {
>             ksession.insert(obj);
>
>         }
>  ksession.startProcess(ruleFlowProcessName);
>         ksession.fireAllRules();
> .... do some response processing here
>
>
> ksession.dispose();
>
> Thomas,
>
> Can you please elaborate on what you did to clean out the facts from the
> memory ?
>
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/rules-
> users-Memory-leak-in-5-2-5-3-tp3280351p3334543.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users


**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************




More information about the rules-users mailing list