Article View: borland.public.jbuilder.java.language
Article #659Re: SocketException
From: lredmond
Date: Mon, 03 Jan 2005 04:02
Date: Mon, 03 Jan 2005 04:02
30 lines
2307 bytes
2307 bytes
The industry which I work in ( medical ) requires a dedicated connection. I fixed the problem by simply re-establihing a new connection when the error occurs. No more need to restart the application "Paul Nichols [TeamB]" <paul@comp.net> wrote in message news:41c20b4c$1@newsgroups.borland.com... > 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:
<41d8c45e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41b8fa86$1@newsgroups.borland.com> <41c20b4c$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 From: "lredmond" <lredmond@nyc.rr.com> Newsgroups: borland.public.jbuilder.java.language References: <41b8fa86$1@newsgroups.borland.com> <41c20b4c$1@newsgroups.borland.com> Subject: Re: SocketException Date: Sun, 2 Jan 2005 23:02:19 -0500 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 24.110.97.165 Message-ID: <41d8c45e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1104725086 24.110.97.165 (2 Jan 2005 20:04:46 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail