Jochen Wiedmann wrote:
> 
>> Depends on the patch. ;-)
> 
>> I understand the use case and I definitely would want it to be
>> supported. I am currently just unsure, whether this isn't already
>> possible, but I assume you have checked sufficiently.
> 

Jochen,

B) 
I am slowly getting acquainted with your source code. Going through it again
I realized that my first suggestion (changing the constructor) won't work.
The InitializationHandler is not run in the constructor. Hence, an
InstantiationHandler in needed. It will be called whenever a new instance is
to be created.

C)
I also noticed that the behaviour of getInstance is not what I would expect
(there might be a perfectly legal reason) when it comes down to how the
InitializationHandler affects the method.
Whenever there is an InitializationHandler set a new instance is created
(see below)!
The InitializationHandler shouldn't affect this, this is what the initial
pInstanceIsStateless controls.

If you agree I'll try to provide a patch for C) and B) (reflection work will
take a little more time) asap, so that it makes it into 3.0.

    private Object getInstance(XmlRpcRequest pRequest) throws
XmlRpcException {
        final InitializationHandler ih = mapping.getInitializationHandler();
        if (ih == null) {
            return theInstance == null ? newInstance() : theInstance;
        } else {
            final Object instance = newInstance();
            ih.init(pRequest, instance);
            return instance;
        }
    } 

Regards,
Jimisola
-- 
View this message in context: 
http://www.nabble.com/InitializationHandler-%28vs-InstantiationHandler%29-tf1963850.html#a5403734
Sent from the Apache Xml-RPC - Dev forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to