[rules-users] Any way to make an AgendaEventListener always attach to any ksession from the same kbase?

Wolfgang Laun wolfgang.laun at gmail.com
Mon Sep 16 04:25:34 EDT 2013


On 16/09/2013, Sonata <plz.write.to at gmail.com> wrote:
> Hi, I have been adding AgendaEventListener to any newly created ksession.
> Once the session disposed, will have to add again to the next ksession.
>
> Is there a way (like an option or config) to set the listener to the kbase,
> so that all the ksession coming from that kbase has this listener by
> default?

No, there isn't, and there are good reasons not to add it.

If I had this requirement, I'd probably implement a Proxy for
KnowledgeBase with the added functionality of maintaining the
listeners and doing the required magic when a new session is created
from the Knowledge Base.

-W


>
> Thank you
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Any-way-to-make-an-AgendaEventListener-always-attach-to-any-ksession-from-the-same-kbase-tp4025964.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list