Cool thanks - I will check out these other methods.
David.
On 12/4/06, Roland Weber <[EMAIL PROTECTED]> wrote:
Hello David,
> In this case I would have to synchrozize this block of code
>
> synchronized(foo) {
> httpClient.setState(getStateForThisUser());
> HttpMethod getMethod = new HttpMethod();
> client.executeMethod(getMethod);
> saveStateForThisUser(httpClient.getState())
> }
No! I suggested to pass a user-specific state object *instead*
of using the default state. Your code would replace the default
state instead of not using it.
> It seems to me I will have to synchronize until the method is complete
and
> the state in HttpClient updated which is quite a bottleneck. Or am I
missing
> something?
Please have a look at the JavaDocs of the HttpClient class.
There are several execute methods, and almost all of them
accept an HttpState object as an argument (iirc).
hope that helps,
Roland
--
-----------------------------
David Cotter CTO
Alatto Technologies Ltd
-----------------------------
[EMAIL PROTECTED]
m. +353 87 6293698
t. +353 1 2090700 (main)
t. +353 1 2090779 (direct)
f. +353 1 2090707
www.alatto.com
-----------------------------
The new way to mobile browse: http://tribes.cc/demo