I feel issue here is the place where init (SynapseEnvironment se) is
calling. It should call after SynapseEnvironment has been completely
created. For Axis2SynapseEnvironment, the time its creation is
finished comes only (can) after axis2 configuration context is
created.  It is the time, axi2 setup is finished so for
Axis2SynapseEnvironment too. Current place that call init
(SynapseEnvironment se) is wrong as it is wrong to give something that
is being built (thing whose integrity is in question) to some one and
tell him that relay one it. It is a misuse of API. Our API is called
by ourselves API in a vulnerable way.

My suggestion is get out the code creating and initiating synapse
environment and configuration out of module and call them after axis2
configuration context creatation is finished. May be to ServerManager.
It may be good to introduce SynapseEnvironmentFactory and
Axis2SynapseEnvironmentFactory implementation where encapsulated all
axis2 related things.  Then, using system property or some other way,
get SynapseEnvironmentFactory implementation and initiates instance
and create  SynapseEnvironment implementation and then call required
initialization code (init (SynapseEnvironment se)). Then it is safe
and correct to move logic inside void init(ConfigurationContext cc) to
init (SynapseEnvironment se) and remove that method.

Thanks
Indika

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@synapse.apache.org
For additional commands, e-mail: dev-h...@synapse.apache.org

Reply via email to