Article View: borland.public.jbuilder.java.language
Article #737Re: SocketException
From: Paul Nichols [TeamB]
Date: Fri, 17 Dec 2004 22:31
Date: Fri, 17 Dec 2004 22:31
21 lines
1923 bytes
1923 bytes
lredmond wrote: > > I have an application that has a dedicated connection to a server. I > send/receive messages via the connection. Whenever they reboot the server > it causes all messages sent by my client app to throw a socket exception > when reading the replies from sending the messages. I must restart the > client app for it to start functioning agian. I have added code and even > ran it through the debugger to check the connection state, the closed > state of the socket and connecte = true and closed = false. is there > soemthing I can check on the socket to prevent having to restart the > client? Are you using a constantly connected state for the Client Sockets to server connectivity? IF so, I would suggest you didn't. Also what about threading the socket connections? Perhaps creating a reboot message to send to all clients, before restarting the server. If the socket is not required to maintain state, you may want to look at replacing the current socket to socket communication with JMS.
Technical Details
Message-ID:
<41c20b4c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!newsfeed.icl.net!newsfeed.freenet.de!easynews.net!easynet-isham!easynet.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41b8fa86$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,f3a9b798501ee744 X-Google-Attributes: gidf74b3,public X-Google-Language: ENGLISH,ASCII-7-bit Message-ID: <41c20b4c$1@newsgroups.borland.com> From: "Paul Nichols [TeamB]" <paul@comp.net> Subject: Re: SocketException Newsgroups: borland.public.jbuilder.java.language Date: Fri, 17 Dec 2004 16:31:33 -0600 References: <41b8fa86$1@newsgroups.borland.com> Lines: 22 Organization: CLC User-Agent: KNode/0.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit NNTP-Posting-Host: 68.113.122.211 X-Trace: newsgroups.borland.com 1103235917 68.113.122.211 (16 Dec 2004 14:25:17 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!newsfeed.icl.net!newsfeed.freenet.de!easynews.net!easynet-isham!easynet.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail