axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lilantha Darshana <Lilan...@virtusa.com>
Subject RE: [AXIS-C++] AxisEngine should not be a singleton & it needs re fact oring.
Date Wed, 23 Jul 2003 10:53:41 GMT
susantha kumara wrote:

>> For an example engine should be configured depending on what you 
>> have in "server-config.wsdd" or you can create your own Server 
>> Config (like BasicServerConfig.java & SimpleProvider.java) and hard 
>> code the TransportHandlers & chains etc. 

>What do you mean here by hard code the TransportHandlers & chains etc ?

One objective is for testing as in BasicServerConfig.java & 
SimpleProvider.java, 
other is for a given session what if we want to give some 
rights/access (per-request) to some set of configurations but
for others. i.e. In addition to the default configuration, a 
privilege user may have access to additional configuration 
that server could provide on runtime! So that the AxisEngine 
related to that session can have additional configurations 
which other session do not.



>I think having a singleton object supports dynamically adding web services 
>and handlers etc (effectively changing server_config.wsdd content) in a
multi-
>threaded environment (but not in a multi-process environment). 
>This is because in a multi-threaded environment there is only one
AxisEngine 
>object. 

I guess you don't require to have a singleton for this. Dynamic deployment
for
*per-server* basis should change the parent instance of a AxisEngine not a 
instance holds by a thread (if the server is already running & users have
access to the services provided by a server -- configuring the AxisEngine at

that time will result in unexpected situations if you don't apply
synchronization
primitives)



>But in a multi-process environment there are multiple AxisEngine objects
even 
>if we use singleton objects. So when a service or handler is dynamically 
>added to the server we have make sure all AxisEngine objects in each
process 
>gets updated.

Sure, you need to update all of them, if you have multiple endpoints in the 
same machine. But not for servers that impl. CGI like processes; 
where we still need configuring the parent AxisEngine not child process 
AxisEngines. I guess, having a singleton in such environment does not
have any impact.

Thanks
Lilantha.



Mime
View raw message