[jboss-jira] [JBoss JIRA] Created: (JBRULES-1583) Heap and scheduled Activations
s s (JIRA)
jira-events at lists.jboss.org
Fri Apr 25 11:22:10 EDT 2008
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
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