> server.addHandler("some.name", new MyHandler());
The XmlRpcServer is instantiated once.
The handler is instantiated once (new MyHandler())
and added to the server instance.
The is only one server instance but it uses multiple workers.
Each worker gets a reference to the handler.
To duplicate the handler, it would at least have to support the
interface 'Clonable' to allow others to clone it.
The class 'Object' does not support Clonable on it's own.
addHandler only expects an instance of Object.
It makes no assumptions on whether the handler is clonable.
(The server's code shows that it does not even try to find out.)
The only thing being cloned is the requestParams Vector
On Mon, 21 Feb 2005 14:48:36 +0200
Paolo Campanella <paolo@migh...> wrote:
> To be really sure, you should make your servlet slow (put in a sleep
> statement). Or else, you would really have to test it under high load:
> if Jetty's maintaining a pool of handlers (the typical behaviour I
> believe; certainly the case in my own configuration) and the servlet
> executes too quickly, it can _appear_ to have just one handler.