You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Carlo Ravagli <ca...@extropia.com> on 2000/09/21 11:07:49 UTC

Initialisation Parameters

Hello all,

I am new to this mailing list so I apologise in advance 
if this topic has already been discussed.

I have a number of application scope instances of a class
that I want to expose through the Apache SOAP server.
I would like to expose them independently because each instance
needs to be configured to accesses a different resource and
hence should have it's own SOAP URI.

The problem I am facing is that I can't seem to configure
them individually at startup.

I came up with three solutions:

1) Expose an init method that accepts some sort of config
parameter and then call this method immediately after startup.
(Yuk)

2) Sub class the class I want to expose with hard coded
config params.
(Super Yuk, don't know how I even thought of it)

3) After examining the code I saw that the rpc servlet does a
forName(...) and then a newInstance(). If this was replaced with
Beans.instantiate(...) I could then use serialised Beans
which had pre specified configured properties.

What should I do ?

Thanks for the help in advance.

Carlo.