<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Arjun Dhar wrote:
<blockquote cite="mid:loom.20071118T054829-203@post.gmane.org"
 type="cite">
  <blockquote type="cite">
    <pre wrap="">You cannot insert data over time into a stateless session, all data is 
added at the same time. When the engine has finished processing it w ill 
return and is finished, at this point as soon as the stateless session 
is available for garbage collection the objects will be removed. There 
is no life cycle other than the standard GC one.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
  <blockquote type="cite">
    <pre wrap="">Shadows are created on non-final classes unless you tell the system not 
to, if you are sure you don't need them you can turn them off. They can 
be turned of for all object, or specific objectsor packages.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
  <blockquote type="cite">
    <pre wrap="">no.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Am sorry I got confused with the statement "All data is added at the same time. 
When engine has finshed processing it will return finish" --&gt; Isn't this 
applicable for a single "execute" only?
  </pre>
</blockquote>
Each time you call execute(....) the previous inserted data references
are nulled and thus able to GC. If you lose the referene to the
stateless<br>
session, that too is nulled and GCd. Look at the code, that will
easiest help you understand:<br>
<a class="moz-txt-link-freetext" href="http://fisheye.jboss.org/browse/JBossRules/branches/Branch_4_0_2_SOA_4_2/drools-core/src/main/java/org/drools/reteoo/ReteooStatelessSession.java?r=HEAD">http://fisheye.jboss.org/browse/JBossRules/branches/Branch_4_0_2_SOA_4_2/drools-core/src/main/java/org/drools/reteoo/ReteooStatelessSession.java?r=HEAD</a><br>
<blockquote cite="mid:loom.20071118T054829-203@post.gmane.org"
 type="cite">
  <pre wrap="">
A fresh execute would imply a 'new usage' of the same session (Since it is 
stateless, else I could use new stateful sessions also each time I had to 
execute). And for this reason I cant understand why can't a stateless session 
be used indefinitely?! As each "execute" is stateless!

So what you are saying is as long a stateless session is not garbage collected, 
it will retain references too all objects asserted to it (even over multiple 
execute calls)?

i.e. session.execute(&lt;Object&gt;) A reference to that object or its shadow will be 
maintained till GC of the session?!









_______________________________________________
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>