[jboss-jira] [JBoss JIRA] Commented: (JBRULES-607) Working memory is not disposed when releasing the RuleSession

Mark Proctor (JIRA) jira-events at lists.jboss.org
Mon Feb 19 09:35:34 EST 2007


    [ http://jira.jboss.com/jira/browse/JBRULES-607?page=comments#action_12353525 ] 
            
Mark Proctor commented on JBRULES-607:
--------------------------------------

I have changed this so that stateless rule sessions do not keep references in the weak hashmap, statefull still do. release() and reset() both now call dispose().

I'm going to commit this to 3.0.6 and trunk.

> Working memory is not disposed when releasing the RuleSession
> -------------------------------------------------------------
>
>                 Key: JBRULES-607
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-607
>             Project: JBoss Rules
>          Issue Type: Patch
>      Security Level: Public(Everyone can see) 
>          Components: JSR94
>    Affects Versions: 3.0.1
>            Reporter: Einat Idan
>         Assigned To: Edson Tirelli
>            Priority: Critical
>             Fix For: 3.0.6
>
>         Attachments: AbstractRuleSessionImpl.java
>
>
> Under heavy load conditions I encountered high cpu and hangs of the system. A thread dump shows all threads being stuck in
> java.util.WeakHashMap, which is called from AbstractRuleBase.addWorkingMemory (please refer to linked thread).
> After digging into the code it turned out that the client session object (AbstractRuleSessionImpl) has a release method. This method is supposed to releases all resources used by this rule session. And so it sets the properties, the working memory and the RuleExecutionSet to null:
> public void release() {
>         this.setProperties( null );
>         this.setWorkingMemory( null );
>         this.setRuleExecutionSet( null );
>     }
> However, it does NOT dispose the working memory as expected.
> I added the following line to method:
> getWorkingMemory().dispose();
> Afterwards things improved significantly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list