Edson:<br><br> Is it a code change inside Drools or is there any other shutdown method that I may call ?<br><br>Mark:<br><br> I completely agree with this future change, it makes much sense in an AppServer environment where we shouldn&#39;t be handling thread creation and disposal by ourselves.<br>
<br>
regards,<br>Rafael<br>
<br><br><div class="gmail_quote">2009/7/17 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>    The problem here is a different one. The engine is calling shutdown() on a thread pool and even without any task being executed, the thread is blocked in an internal JDK queue waiting for the timeout. I replaced the call by shutdownNow(), forcing the jdk to signal an interrupt to the thread and this seemed to work. I am investigating side effects of this procedure right now.<br>

<br>    []s<br>    Edson<br><br><br><div class="gmail_quote">2009/7/16 Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org" target="_blank">mproctor@codehaus.org</a>&gt;</span><div><div></div><div class="h5">
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Rafael Ribeiro wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt;  I&#39;ve downloaded Drools fusion sample and started to make some changes to<br>
&gt; the code (first of all wipe out the UI so I can test it easier).<br>
&gt;  I tried to get to a minimal set so I can run a console main class and see<br>
&gt; what happens but I am facing a strange behaviour.<br>
&gt;  As soon as I start pushing events into the WorkingMemoryEntryPoint<br>
&gt; (&quot;StockTick stream&quot;) a Thread - not daemonized since it blocks shutdown from<br>
&gt; ending - is spawned and this prevents my JVM from shutting down (obviously<br>
&gt; if I call System.exit(0) it will but I am avoiding this).<br>
&gt;  I&#39;ve tried both to halt and dispose the session that this entry point<br>
&gt; belongs but with no success. Does anyone know how could I get rid of this<br>
&gt; thread?<br>
&gt;<br>
</div>Drools is starting up threads in a number of places now - using &quot;new<br>
Thread()&quot;. I think the plan is to change this to an interface call that<br>
allows pluggable implementations. So that the user can decide how<br>
threads are executed and stopped.<br>
<br>
Mark<br>
&gt; best regards,<br>
<div>&gt;<br>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
</div><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>

</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>