[rules-users] java.lang.OutOfMemoryError: Java heap space

mohan mohan.narangoda at gmail.com
Thu Oct 11 23:30:03 EDT 2012


Hi laune,
I'll explain the process briefly. I’m getting voice call events from our
billing system. We want give some offers if call made inside specific cell
(uploaded this fact to WM in advance) . But we have to give offer only once
per day. So repeated calls inside this cell won’t eligible for offer again.
To achieve this we initiate a new event(NotificationEvent) and insert into
WM and set metadata @expires(24h) against each mobile no. Ultimately over
1000K NotificationEvents are residing in WM per day and guess it will
trigger OutOfMemory exception.  How to handle such a case? Do we need to use
caching mechanism?

Thanks.

see below code snippet

rule "Voice CYM offer selector"
dialect "java"
no-loop true
when
        $vc : VoiceCallEvent( $ct : eventTime, $cell : cellID, $mobile :
originNumber) from entry-point "IN-VOICE-CALL-EVENT"
        $offer : CymOfferInfo($valTo : validTo.time >= $ct, cellId ==
$cell,$offerId : offerType.getId, $msgContent : cepMsgTemplates.getId)
        not( OfferedEvent(mobileNo == $mobile , offerId ==  $offerId ))
then
       CYMOfferMessage genMsg = new CYMOfferMessage();
       OfferedEvent offered = new OfferedEvent();
       offered.setMobileNo($mobile);
       offered.setOfferId((String)$offerId);
       genMsg.setMobile($mobile);
       genMsg.setMsgContent($msgContent);

    /* atttach offer here */
      
    /*  drop SMS message to queue & block offer trigger again*/
        mdbService.dropMessage(genMsg);
        insert(offered);      
end



--
View this message in context: http://drools.46999.n3.nabble.com/java-lang-OutOfMemoryError-Java-heap-space-tp4020185p4020235.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list