Hi Arjun - I wouldn't recommend re-using session unless there is some
expensive state you wish to reuse. Pooling them will use up far more
resources then freeing them. You should only pool expensive to obtain
resources.

On 7/21/07, Arjun Dhar <[EMAIL PROTECTED]> wrote:

> Stateless sessions should not hold onto any references. Stateful do,
> and dispose() must be called when its finished - otherwise the rulebase
> holds a reference forever. If the rulebase is holding onto stateless
> sessions, then that is a bug.
> Mark
>

Thanks a lot Mark,
taking the latest binary passed the load testing one a single thread
atleast.
Though I need to confirm due to removal of "modify()" none of the
functionality
has got altered. It chokes a little in the middle but is not going out of
memory so I guess the leak is really fixed.

One last question on this:
On the Build 4MR2, I disposed the session and created a new one from the
cached
RuleBase and it took the load (on the code that had the memory leak)

So what approach is conceptually better; Keep the same statless session
for
ever or for each execution request use a new one?? I talking pure
performance/memory?!?!

I remember you saying creating sessions is cheap; so if I have a million
requests and for each one I create a new session is it still cheap? or a
single
stateless session servicing the requests is better?
Typical Application: telephone exchange; where numbers are bombarding the
engine. For each incomming request I'd assume a single session would be
the
most optimal solution as long as the rules are common. Right?!

I'm wondering if I should also maintain an image, object = {RuleBase +
Globals}
so I can create a session. but I think this would have a huge performance
cost
to create new sessions per request. Right?

Thanks for the Fix, its  life saver!


Thanks,
Arjun



_______________________________________________
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

Reply via email to