You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Sanket Totala <sa...@nodeinfotech.com> on 2005/03/16 20:24:55 UTC

RE: jetty with XML-RPC


-----Original Message-----
From: tengri_lethos@web.de [mailto:tengri_lethos@web.de]
Sent: Thursday, February 24, 2005 2:02 AM
To: xmlrpc-user@ws.apache.org
Subject: Re: jetty with XML-RPC


To be really sure, take a look at the sources.

>    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
of XmlRpcRequestProcessor.

So long
Andreas

On Mon, 21 Feb 2005 14:48:36 +0200
Paolo Campanella <pa...@mighty.co.za> 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.
> 
> 
> Bye
> 
> Paolo
> 
>