jack wu wrote:
my profiler shows that it takes the same amount of time to do:
final RuleBase ruleBase = RuleBaseFactory.newRuleBase(
RuleBase.RETEOO, conf );
as to do:
session.executeWithResults();
i am wondering if i can cache the ruleBase and do addPackage() and
removePackage() for each executeWithResults().
the ducmentation says always create a new ruleBase. so i am kind of
confused. thanks for the help.
Yes you can do this, but it's not thread safe
(unlike stateful
sessions). The stateless session could be propagating data mid change
and thus leaving the network invalid. So if you do this, which is not
recommended practice, do make sure that you know that there are
currently no valid executing sessions for that RuleBase.
thanks.
------------------------------------------------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo!
Search.
<
http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch...
------------------------------------------------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users