FW: Thread waiting indefinitely
<[email protected]> Wed, 11 Oct 2006 13:06:21 -0400
| Newsgroups | gmane.network.beep.beepcore.java.general |
|---|---|
| Message-ID | <AE720E3F9BA6C844A7843B1B789FB0BB04AFB9AC@toroondc512> |
This is a multi-part message in MIME format. --===============1940676817== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6ED57.92F296D5" This is a multi-part message in MIME format. ------_=_NextPart_001_01C6ED57.92F296D5 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Any help would be appreciated. Anyone could answer that? =20 -----Original Message----- From: Bussieres, Eric (EX11572)=20 Sent: October 6, 2006 2:50 PM To: '[email protected]' Subject: Thread waiting indefinitely =20 Hi, =20 I have one problem while waiting for a Reply after having sent a MSG. I send a message and wait for a reply. So the thread hangs on method lReply.hasNext(). If a disconnection occurs, the thread will still be waiting on the reply since nobody notify it. How could I fix this problem? =20 mChannel.sendMSG(new StringOutputDataStream("application/xml", lBuffer.toString()), lReply); =20 while (lReply.hasNext()) { do something ... } =20 Thanks ! ------_=_NextPart_001_01C6ED57.92F296D5 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html> <head> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii"> <meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)"> <style> <!-- /* Font Definitions */ @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; 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 {font-family:Arial; color:windowtext;} span.EmailStyle18 {font-family:Arial; color:navy;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} div.Section1 {page:Section1;} --> </style> </head> <body lang=3DEN-CA link=3Dblue vlink=3Dpurple> <div class=3DSection1> <div> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span = style=3D'font-size: 10.0pt;font-family:Arial;color:navy'>Any help would be appreciated. = Anyone could answer that?</span></font></p> <p class=3DMsoNormal><font size=3D3 color=3Dnavy face=3D"Times New = Roman"><span style=3D'font-size:12.0pt;color:navy'> </span></font></p> </div> <p class=3DMsoNormal><font size=3D2 face=3DTahoma><span lang=3DEN-US = style=3D'font-size: 10.0pt;font-family:Tahoma'>-----Original Message-----<br> <b><span style=3D'font-weight:bold'>From:</span></b> Bussieres, Eric = (EX11572) <br> <b><span style=3D'font-weight:bold'>Sent:</span></b> </span></font><font = size=3D2 face=3DTahoma><span lang=3DEN-US = style=3D'font-size:10.0pt;font-family:Tahoma'>October 6, 2006</span></font><font size=3D2 face=3DTahoma><span lang=3DEN-US style=3D'font-size:10.0pt;font-family:Tahoma'> </span></font><font size=3D2 face=3DTahoma><span lang=3DEN-US = style=3D'font-size:10.0pt;font-family:Tahoma'>2:50 PM</span></font><font size=3D2 face=3DTahoma><span lang=3DEN-US = style=3D'font-size: 10.0pt;font-family:Tahoma'><br> <b><span style=3D'font-weight:bold'>To:</span></b> '[email protected]'<br> <b><span style=3D'font-weight:bold'>Subject:</span></b> Thread waiting indefinitely</span></font></p> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span = style=3D'font-size: 12.0pt'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Hi,</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>I have one problem while waiting for a Reply after = having sent a MSG. I send a message and wait for a reply. So the thread hangs = on method lReply.hasNext(). If a disconnection occurs, the thread will = still be waiting on the reply since nobody notify it. How could I fix this = problem?</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>mChannel.sendMSG(new StringOutputDataStream("application/xml", = lBuffer.toString()),</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> = &= nbsp; lReply);</span></font></p= > <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>while (lReply.hasNext()) {</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> do something …</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>}</span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> </span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Thanks !</span></font></p> </div> </body> </html> ------_=_NextPart_001_01C6ED57.92F296D5-- --===============1940676817== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 --===============1940676817== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Beepcore-java-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/beepcore-java-users --===============1940676817==--