> Essentially you _assume_ HttpClient is the culprit, rather
> synchronization logic in your code, don't you?
> 
> To see what exactly what is happening inside HttpClient 
> components, run
> it with both wire and context logging on. You should also use 
> a logging
> toolkit that can provide you with the thread context information (such
> as Log4j), since this problem appears to be threading related. If you
> need help interpreting the logs feel free to post them to this list. 

When I was using the built in HttpURLConnection I could clearly see that
multiple threads were actually working at the same time.  The only
change I made was to use the HttpClient library in place of the
HttpURLConnection library and I found this problem.

Just to be sure that there wasn't something else causing things to act
this way, I put a sleep that adjusted based on the size of the file in
place of where the executeMethod and getResponseBodyAsStream calls go.
When I use the sleep, I clearly see that 4 threads are working and
completing at different times relative to the size of the file.  When I
add the code back to actually make the network call, it goes back to
putting one request after another.

I wish I could give you a working version of the program, but it depends
on internal server side stuff to work correctly.  I was hoping that I
was making a call incorrectly, but it seems like something stranger is
going on.  I need to actually switch and work on something else right
now but would like to create a simple program that can show this problem
clearly without the other dependencies.  Maybe I can do that next week
and post it.

When do you mean by context logging?  Is there something in the
HttpClient library that I should enable to see what is going on?  And
are you referring to a packet tracking tool like Wireshark for wire
logging, or is that another HttpClient option that I should turn on?

I have a debug window that I write log messages to that basically acts
as my log to see what is going on and I have message give me thread
information in there when it's relevant.

Thanks much for the responses.  Even though I haven't gotten the problem
solved, I feel I am making some progress.  If you have any other
suggestions I would love to hear them, otherwise I will try and work on
a sample program that I can actually post to demonstrate my problem.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to