<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
jack wu wrote:
<blockquote cite="mid:768974.3094.qm@web82008.mail.mud.yahoo.com"
type="cite">my profiler shows that it takes the same amount of time to
do:<br>
<br>
final RuleBase ruleBase = RuleBaseFactory.newRuleBase( RuleBase.RETEOO,
conf );<br>
<br>
as to do:<br>
session.executeWithResults();<br>
<br>
i am wondering if i can cache the ruleBase and do addPackage() and
removePackage() for each executeWithResults().<br>
<br>
the ducmentation says always create a new ruleBase. so i am kind of
confused. thanks for the help.<br>
</blockquote>
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.<br>
<blockquote cite="mid:768974.3094.qm@web82008.mail.mud.yahoo.com"
type="cite"><br>
thanks.<br>
<br>
<p> </p>
<hr size="1">Looking for last minute shopping deals? <a
moz-do-not-send="true"
href="http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping">
Find them fast with Yahoo! Search.</a>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>