[jboss-jira] [JBoss JIRA] Closed: (JBRULES-1583) Heap and scheduled Activations

Mark Proctor (JIRA) jira-events at lists.jboss.org
Fri May 2 22:58:18 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBRULES-1583?page=all ]

Mark Proctor closed JBRULES-1583.
---------------------------------

    Resolution: Done

> Heap and scheduled Activations
> ------------------------------
>
>                 Key: JBRULES-1583
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1583
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.0.4
>         Environment: Windows XP / Eclipse Europa / Java 1.5 / drools 4.0.4
>            Reporter: s s
>         Assigned To: Mark Proctor
>             Fix For: 4.0.7, 5.0.0-M1
>
>
> Hi everyone,
> I've wrote that rule:
> rule "COMPTEUR"
> duration 10000
> when
> 	$alarme : Alarm ();
> then
> 	$alarme.increment();
> 	update($alarme);
> end
> Using JProfile, I've noticed that PropagationContextImpl was constantly growing
> in the heap. Then, I looked the scheduled activations and saw that some
> scheduledExecutionTime was expired. So, I wrote this code to purge the expired
> activations:
> Activation[] activations = session.getAgenda().getScheduledActivations();
> long now = (new Date()).getTime();
> for(int i=0;i<activations.length;i++){
> 	if( now >
> ((org.drools.common.ScheduledAgendaItem)activations[i]).scheduledExecutionTime()){
> 		activations[i].remove();
> 	}
> }
> Now, the heap isn't growing anymore but what are the consequences of doing
> something like that? So far, there are no noticeable regression on my
> application.
> Thanks for your help.

-- 
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