[esb-issues] [JBoss JIRA] Created: (JBESB-642) JBossRulesRouter does not dispose of WorkingMemory

Jeff DeLong (JIRA) jira-events at lists.jboss.org
Fri Jun 22 09:54:53 EDT 2007


JBossRulesRouter does not dispose of WorkingMemory
--------------------------------------------------

                 Key: JBESB-642
                 URL: http://jira.jboss.com/jira/browse/JBESB-642
             Project: JBoss ESB
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Content Based Routing
    Affects Versions: 4.2
            Reporter: Jeff DeLong
         Assigned To: Mark Little


In examining the JBossRulesRouter code it does not dispose of workingMemory (statefulSession) at the end of the method. 

WorkingMemory workingMemory = ruleBase.newStatefulSession();
    		logger.log(Level.DEBUG,
    				"Obtained message=" + message + " with ruleSet=" + ruleSet);
    		workingMemory.setGlobal("destinations", destinations);
            if (objectList!=null) {
                for (Object object : objectList) {
                    workingMemory.assertObject(object);
                }
            }
    		workingMemory.assertObject(message);
    		logger.log(Level.DEBUG, "Fire the JBossRules Engine");
    		workingMemory.fireAllRules();
    		logger.log(Level.DEBUG,
    				"Outgoing Destinations: " + destinations);
            return destinations;
       }

I believe it should:

i.e.,

           WorkingMemory workingMemory = ruleBase.newStatefulSession();
            ...
           workingMemory.dispose();

This allows garbage collection of the workingMemory.   		


-- 
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 esb-issues mailing list