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'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"><<a href="mailto:tirelli@post.com">tirelli@post.com</a>></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"><<a href="mailto:mproctor@codehaus.org" target="_blank">mproctor@codehaus.org</a>></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>
> Hi all,<br>
><br>
> I've downloaded Drools fusion sample and started to make some changes to<br>
> the code (first of all wipe out the UI so I can test it easier).<br>
> I tried to get to a minimal set so I can run a console main class and see<br>
> what happens but I am facing a strange behaviour.<br>
> As soon as I start pushing events into the WorkingMemoryEntryPoint<br>
> ("StockTick stream") a Thread - not daemonized since it blocks shutdown from<br>
> ending - is spawned and this prevents my JVM from shutting down (obviously<br>
> if I call System.exit(0) it will but I am avoiding this).<br>
> I've tried both to halt and dispose the session that this entry point<br>
> belongs but with no success. Does anyone know how could I get rid of this<br>
> thread?<br>
><br>
</div>Drools is starting up threads in a number of places now - using "new<br>
Thread()". 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>
> best regards,<br>
<div>><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>