By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,319 Members | 1,963 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,319 IT Pros & Developers. It's quick & easy.

tomcat not processing incoming requests from MFC app

P: n/a
Hi,

I have an problem that I've been struggling with for a week now and
simply can not resolve. I have an MFC C++ application that sends a
request to a servlet which sends back data continuously - the doGet
method does not return until the client quits. In a different thread
of the same MFC app, I start periodically sending requests to a
different servlet on the same serverthrough a separate CHttpFile
connection in the client program. These requests are not seen by
tomcat - the log files don't show them and the client application itself
hangs on either the httpfile->sendRequest() method or the
httpFile->endRequest() method (if I used sendRequestEx).

The two different servlets do share a resource - a hashtable of sockets,
however it doesnt seem to be a blocking problem since the requests get
processed exactly as intended when I send them from a separate process
on the client side (from another test application).

If I restart the servlet from the tomcat manager window - the first
request (the one that is spinning) quits, and as soon as it quits i see
the first few requests from the second thread come in and obviously get
rejected because the application is being reloaded.

So I guess the question is : what would prevent tomcat from processing
those new requests from a different thread immediately - whats' keeping
them on the queue and why isnt there a new thread laucnhed in tomcat to
handle them?

Thank you!

Dmitriy
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ct
> These requests are not seen by
tomcat - the log files don't show them and the client application itself
hangs on either the httpfile->sendRequest() method or the
httpFile->endRequest() method (if I used sendRequestEx).


Hmmm...do you ever have more than two requests open to the server? HTTP 1.1
says a client can make up to two concurrent connections to a server.
WinInet enforces that restriction. One way to get around it is to have some
sockets connect to the hostname, some connect to the IP.

Good luck,

C
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.