Thanks Mark, Wolfgang,

I had a look at the source code of StatelessKnowledgeSessionImpl.java (from
https://github.com/droolsjbpm/drools/blob/5.5.0.Final/drools-core/src/main/java/org/drools/impl/StatelessKnowledgeSessionImpl.java )
It seems that when execute(..) is being called for the first time, the event listeners are being added to this.agendaEventSupport, see line number 136. However when the dispose() method is being called internally by Drools this agendaEventSupport collection is cleared. Then upon further executions (calls to the execute(..) method) the event listeners are no longer added to this.agendaEventSupport and hence they are not being triggered
I've created JBRULES-3711.

Thank you.
Best regards,
Michal

On Sat, Jan 5, 2013 at 5:20 AM, Mark Proctor <mproctor@codehaus.org> wrote:
each execute creates a new stateful session. All the listers are added to that after it's created, see newWorkingMemory:
https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/impl/StatelessKnowledgeSessionImpl.java

Mark
On 4 Jan 2013, at 16:20, Wolfgang Laun <wolfgang.laun@gmail.com> wrote:

> On 04/01/2013, Michal Bali <michalbali@gmail.com> wrote:
>> Hi Wolfgang,
>>
>> I am not calling dispose() as it is not possible to dispose a stateless
>> session.
>
> Which I didn't suggest you'd do.
>
>> I've just noticed that it is called automatically by Drools
>> internal code (when calling StatelessKnowledgeSession.execute(Iterable)
>> method).
>
> And I tried to point out its consequences and the lack of
> clarification in the Drools docs whether this is the end of life for a
> StatelessKnowledgeSession.
>
> -W
>
>>
>> Thank you for responding.
>> Best Regards,
>> Michal
>>
>>
>> On Wed, Dec 26, 2012 at 9:45 AM, Wolfgang Laun
>> <wolfgang.laun@gmail.com>wrote:
>>
>>> tertium non datur
>>
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users