users@jersey.java.net

Re: [Jersey] is client instance thread-safe?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 22 Sep 2008 09:35:11 +0200

On Sep 20, 2008, at 3:47 PM, Walter Chang wrote:

> i am using the client api in a multi-threaded environment. is a
> client instance created like "Client.create()" safe to use in a
> multi-threaded scenario?
>

Yes, when creating WebResource instances (which are themselves thread-
safe) and making requests.

The area that is not thread safe is the configuration of properties
and filters (on Client and WebResource).

Filters need to be re-entrant.

I will add some description to the JavaDoc.

Paul.

> regards,
>
> walter chang
>
> --
> .......__o
> .......\<,
> ....( )/ ( )...