Hi Daniel,

Restlet instances are intended to be thread-safe. Multiple simultaneous
threads WILL invoke the same handle(Request, Response) method on your
Restlet instance so you need to ensure that you don't rely on member
variables without great care (synchronization).

Note that if you need to store state in your Restlet, you probably should be
using a Resource subclass instead. Resources don't suffer from the same
constraint because new dedicated instance will be allocated for each call by
the Finders. 

Best regards,
Jerome  

> -----Message d'origine-----
> De : news [mailto:[EMAIL PROTECTED] De la part de Daniel
> Envoyé : lundi 26 février 2007 01:14
> À : [email protected]
> Objet : Restlet Singleton ?
> 
> I want to use Spring to weave my application with Restlet and Spring.
> 
> Can class derived from Restlet defined in singleton?
> 
> if so, should the handle method of restlet thread-safe?
> 
> and do you make your framework spring friendship?(I find it 
> is not easy to
> combine both of them).
> 
> Best Regard!
> 
> Daniel

Reply via email to