Thread View: borland.public.jbuilder.java.api
2 messages
2 total messages
Started by lredmond
Tue, 26 Oct 2004 23:24
Socket Info
Author: lredmond
Date: Tue, 26 Oct 2004 23:24
Date: Tue, 26 Oct 2004 23:24
10 lines
1710 bytes
1710 bytes
I have a clinet which keeps a dedicted connection to a server and send messages. my problem is that a message has to wait for a response that can take several seconds to return. I have a timeout set say for 10 seconds if I dont get a response then fail my message and send the next one in he queue. Sometimes this occurs and the programs sends a messages while the response comes back ( which took a little more than 10 seconds which causes a deadlock....can this process be multithreaded... I know I can increase the wait period but now that slows down my process alot since I'm dealing with thousands of messages. I need to send multiple messages and not worry about deadlocks.
Re: Socket Info
Author: Paul Nichols (TeamB)
Date: Wed, 27 Oct 2004 21:36
Date: Wed, 27 Oct 2004 21:36
22 lines
1789 bytes
1789 bytes
"lredmond" <lredmond@nyc.rr.com> wrote in message news:417edcd3$1@newsgroups.borland.com... > I have a clinet which keeps a dedicted connection to a server and send > messages. my problem is that a message has to wait for a response that can > take several seconds to return. I have a timeout set say for 10 seconds if > I dont get a response then fail my message and send the next one in he > queue. Sometimes this occurs and the programs sends a messages while the > response comes back ( which took a little more than 10 seconds which causes > a deadlock....can this process be multithreaded... I know I can increase the > wait period but now that slows down my process alot since I'm dealing with > thousands of messages. I need to send multiple messages and not worry about > deadlocks. > Well, you could write a socket pool, but it sounds as though your app would be a good candidate for something like JMS.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads