Threads and HttpsURLConnection underlying shared connection?
Threads and HttpsURLConnection underlying shared connection?
- Subject: Threads and HttpsURLConnection underlying shared connection?
- From: Kieran Kelleher <email@hidden>
- Date: Tue, 17 May 2005 13:04:44 -0400
In my java Web Application I have a class that processes credit card
transactions against a service provider (viaklix).
For each transaction, I create two threads .... a managerThread and a
processorThread. The processorThread does the actual transaction
processing which basically creates a HttpsURLConnection, writes out
(POST) form data to our service provider and reads the response. The
managerThread monitors the processorThread to make sure it completes
its task within allotted timeOut using join and interrupt.
My problem is that when I initiate a number of transactions (multiple
transaction classes each with two threads), the instances of
HttpsURLConnection in the separate threads each seem to have to wait
for other threads' HttpsURLConnection instances to finish reading their
response before it can get a connection. I have confirmed this by
logging the threads' activities.
Is it not possible to have multiple threads simultaneously connected
and performing HttpsURLConnection POST/RESPONSE from my app (acting as
a client) to the same provider (www.viaklix.com)??
Any suggestions as to how I can alleviate this situation .... am I
missing some basic concept here? Is there some single underlying shared
connection that my HttpsURLConnection instances are constrained by?
Regards, Kieran
-Kieran
________________________________________________________________
My hardware/software configurations (in case they are relevant to the
problem):
Dev Config = OS X 10.3.7 / Java 1.4.2_05 / WO 5.2.3 / XCode v1.5 /
MySQL 4.0.23 / Connector-J 3.0.16
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden