By default, Drools does not start any internal thread, so that you can
embed it in non-multithread applications or in JEE containers. That means
that the actual release of events in such cases depends on triggers. In your
example, after 1h has passed, whenever something happens to the session (a
new rule is fired, a new event is inserted, the session clock is advanced,
etc), the event will be expired as part of the action. Remember though that
it only happens when running in STREAM mode. In CLOUD mode, event garbage
collection does not make sense and will not happen.
Edson
2011/3/16 Makewise - Vitor Rui Mendonça <Vitor.Mendonca(a)brisa.pt>
Hi all!
I’ve got a really basic doubt… I’ve read several documentation regarding it
but I think I need some advice here…
Imagine that I have an event:
*declare* A
@role( event )
@expires( 1h )
*end*
On my Java code, I call “fireAllRules()” method every time that I put an
event into the working memory.
My doubt: When does event A expires?
a) One hour after it was inserted (time-based and without the
“fireAllRules()” method call) or
b) by calling “fireAllRules()” method (event-based)
T.I.A.
Vítor Mendonça Moreira
*Analista / Programador
Direcção de Investigação e Desenvolvimento*
Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.
2500 - 206 - Caldas da Rainha
Tel: (+351) 262 832 196
Fax: (+351) 262 186 455
Web:
www.makewise.pt
Uma empresa: Grupo Sousa Pedro <
http://www.sousapedro.com>
------------------------------
Declaração:
A informação contida nesta mensagem, e os ficheiros anexos, é privilegiada
e confidencial, destinando-se exclusivamente ao(s) destinatário(s).Se não é
o destinatário (ou o responsável pela sua entrega ao destinatário) e recebeu
a mesma por engano, fica notificado que é estritamente proibido reproduzir,
guardar ou distribuir toda ou qualquer parte desta mensagem e ficheiros
anexos.Por favor reencaminhe a mensagem para o responsável pelo seu envio ou
contacte-nos por telefone e elimine a mensagem e ficheiros anexos do seu
computador,sem os reproduzir.
Disclaimer:
The information contained in this message, and any files attached, is
privileged and confidential, and intended exclusively for the included
addresses.If you are not the intended recipient (or the person responsible
for delivering to the intended recipient) and received this message by
mistake, be aware that copy, storage, distribution or any other use of all
or part of this message and the files attached is strictly prohibited.
Please notify the sender by reply e-mail or contact us by telephone and
delete this message and the files attached, without retaining a copy.
------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @
www.jboss.com