users@jersey.java.net

Re: Restful web service threading question

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Sat, 19 Jan 2008 19:00:05 -0500

On Jan 19, 2008, at 1:31 AM, KSChan wrote:
>
> I am facing a problem that more than one concurrent web service
> threads are accessing the same resource and making something wrong ...
>
> How can I deal with this?
>
The default is that Jersey will create a new resource class instance
for each request (thread) so unless you have some static fields that
aren't protected by a mutex then you should be OK. Can you describe in
a little more detail what your resource class looks like and what
problem you are seeing ?

Thanks,
Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.