<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:st="" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:911156126;
        mso-list-type:hybrid;
        mso-list-template-ids:1752327702 67698711 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-number-format:alpha-lower;
        mso-level-text:"%1\)";
        mso-level-tab-stop:.75in;
        mso-level-number-position:left;
        margin-left:.75in;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Hi all,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">I apologize if this lacks a degree of specificity (and evidence); I’ve inherited some jcifs-related work from a former co-worker and am essentially trying to
 get caught up on what he did. This is really intended as a disclosure of some changes we made to jcifs rather than a request for help; we seem to have the issue resolved but since jcifs is licensed under the LGPL I figure we should share the alterations with
 the community in case they might be useful to others, and maybe they can be considered for inclusion in a later release of jcifs.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">My company’s product uses jcifs to connect to a number of remote windows machines (depending on the customer, this could be just a handful, or several hundred).
 We have two components that make use of jcifs for different purposes; each employs its own retry mechanism. One utilizes a retry queue such that if a given connection attempt to a remote machine does not complete successfully within 45 seconds, we wait 30
 seconds and make another connection attempt. We keep trying every 30 seconds until success. The other component doubles its wait interval between each retry attempt; starting at 1 second for the first connect failure, 2 seconds for the second, 4 seconds for
 the third, etc, though we max out at 15 minutes.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">A while back we came across a problem where we were accumulating threads at a rate such that we would eventually hit an OOM that would kill our jvm. This was
 because the windows machines we were trying to connect to were not responsive, and whatever issue they were having resulted in the threads created in jcifs.util.transport.Transport.connect(long timeout) blocking and staying active even after the timeout expired
 and the reference to the thread was nullified by the creating thread. The next time a connect attempt was initiated, another thread would be created in the connect() method, and this would continue until we had a serious problem on our hands because of the
 accumulation of stranded blocked threads. I can’t give details as to what the threads were blocking on because I can’t find any thread dumps from when the original issue was investigated, nor any explanation as to how to reproduce the problem (it was discovered
 at a customer site).<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">My predecessor’s solution to this was to:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><span style="mso-list:Ignore">a)<font size="1" face="Times New Roman"><span style="font:7.0pt "Times New Roman"">      
</span></font></span></span></font><![endif]><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">add a thread.interrupt() call to the synchronized(thread){} block of jcifs.util.transport.Transport.connect(long timeout) in an effort
 to make sure the thread does not hang around forever:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in;text-autospace:
none">
<b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:#7F0055;font-weight:
bold">synchronized</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
 (</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;
font-family:"Courier New";color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">)
 {</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">               
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">.start();</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">               
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">.wait(
 timeout );          </span></font><font size="2" color="#3f7f5f" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:#3F7F5F">/* wait for doConnect */</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">               
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#7F0055;font-weight:bold">switch</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">
 (</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:#0000C0">state</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">)
 {</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                   
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#7F0055;font-weight:bold">case</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">
 1: </span></font><font size="2" color="#3f7f5f" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:#3F7F5F">/* doConnect never returned */</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                       
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">state</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
 = 0;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                       
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">.interrupt();</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                       
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
 = </span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;
font-family:"Courier New";color:#7F0055;font-weight:bold">null</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                       
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:#7F0055;font-weight:bold">throw</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#7F0055;font-weight:bold">new</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">
 TransportException( </span></font><font size="2" color="#2a00ff" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#2A00FF">"Connection timeout"</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">
 );</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                   
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#7F0055;font-weight:bold">case</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">
 2:</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                       
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:#7F0055;font-weight:bold">if</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">
 (</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:#0000C0">te</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">
 != </span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#7F0055;font-weight:bold">null</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">)
 { </span></font><font size="2" color="#3f7f5f" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:#3F7F5F">/* doConnect throw Exception */</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                           
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:#0000C0">state</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">
 = 4;                        </span></font><font size="2" color="#3f7f5f" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:#3F7F5F">/* error */</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                           
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">
 = </span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:#7F0055;font-weight:
bold">null</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                           
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:#7F0055;font-weight:bold">throw</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">te</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                        }</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                       
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">state</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
 = 3;                         </span></font><font size="2" color="#3f7f5f" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#3F7F5F">/* Success! */</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                       
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:#7F0055;font-weight:bold">return</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                }</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">            }</span></font><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left:.75in;text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><span style="mso-list:Ignore">b)<font size="1" face="Times New Roman"><span style="font:7.0pt "Times New Roman"">      
</span></font></span></span></font><![endif]><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">add a cleanupThread() method to jcifs.util.transport.Transport, called from connect(long timeout) before creating the new thread, to check
 if the thread has already been initialized by a previous call to connect() and if so, interrupt and nullify it.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in;text-autospace:
none">
<font size="2" color="#0000c0" face="Courier New"><span style="font-size:
10.0pt;font-family:"Courier New";color:#0000C0">state</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">
 = 1;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">           
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">te</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
 = </span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;
font-family:"Courier New";color:#7F0055;font-weight:bold">null</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">           
<span style="background:silver">cleanupThread</span>();</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">           
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
 = </span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;
font-family:"Courier New";color:#7F0055;font-weight:bold">new</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">
 Thread( </span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:#7F0055;font-weight:bold">this</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">,
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">name</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
 + </span></font><font size="2" color="#2a00ff" face="Courier New"><span style="font-size:10.0pt;
font-family:"Courier New";color:#2A00FF">"-"</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">
 + </span></font><i><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0;font-style:italic">threadId</span></font></i><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">++
 );</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">     
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">.setDaemon(
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:#7F0055;font-weight:bold">true</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">
 );</span></font><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">
<o:p></o:p></span></font></p>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">                       
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;
font-family:"Courier New";color:#7F0055;font-weight:bold">private</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#7F0055;font-weight:bold">void</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">
 cleanupThread()</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">            {</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                 
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#7F0055;font-weight:bold">if</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">
 (</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">
 == </span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#7F0055;font-weight:bold">null</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">)</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                  {</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                       
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:#7F0055;font-weight:bold">return</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                  }
</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                 
</span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#7F0055;font-weight:bold">if</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">
 (</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">.isAlive())</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                  {</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                       
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">.interrupt();</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                  }</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">                 
</span></font><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:#0000C0">thread</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
 = </span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;
font-family:"Courier New";color:#7F0055;font-weight:bold">null</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:
"Courier New";color:black">;</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New""><o:p></o:p></span></font></p>
<p class="MsoNormal" style="margin-left:.5in"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";
color:black">      }</span></font><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">These two changes seem redundant to me, and a bit dangerous (I’d prefer not to blindly interrupt a thread in progress), but without knowing how to reproduce
 the problem to test, I’m forced to take my predecessor’s word for it (and the fact that the customer’s ticket was closed) that it worked.
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">I don’t necessarily expect these changes to be included in a future release because of the vagueness of the problem, but if anyone has seen a similar thread
 accumulation, you could try making these same changes (one or the other or both), and if it helps, maybe you could share a thread dump of the situation prior to the change, so it can be properly documented as to what the problem is (i.e. what the threads end
 up blocked on). If the problem can be properly identified and reproduced, and the solution proven to be effective, it might make a good addition to a future release (whenever that might be).<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Cheers,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Colin<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p> </o:p></span></font></p>
</div>
</body>
</html>