Hello Christiaan,
> I've been experimenting with the MultiThreadedExample on the
> HTTPClient website
> (http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/examples/MultiThreadedExample.java?view=markup)
> and it seems that a new SSL connection/session is created for every
> thread and the session is re-used within each thread for each
> executeMethod call, but of course every time
> "httpClient.executeMethod(method);" is called it waits for a reply
> before I can make another request within that thread.

Yes, every thread obtains it's own connection from MTHCM, every
(HTTP) connection opens a new SSL connection with a separate
SSL session.

> Is it possible to additionally make parallel requests within an SSL
> session?

I'm not that familiar with SSL sessions. If it is possible to open
several SSL connections with the same session, you could do that.
But I guess the SSL session contains the cipher suite and session
key that is negotiated for that specific SSL connection. If that
is the case, you can't have multiple connections using the same
session. And you cannot execute multiple requests over a single
connection in parallel. Pipelining would be the best that the HTTP
specification allows, and that's not supported in HttpClient 3.1
or 4.0.

If I am wrong about the one-to-one relation of SSL connections
and SSL sessions, you could install a SecureProtocolSocketFactory
that creates multiple connections for the same session. That's
easy if you want all connections to share the same session, and
very tricky if you only want some connections to share a session.

Maybe somebody else can provide the missing pieces.

cheers,
  Roland

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

Reply via email to