synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera" <>
Subject Re: startup order - correct place to start transport listeners
Date Sun, 29 Mar 2009 09:02:38 GMT
Hi Eric
> If I'm not wrong it looks like the transports are started somewhere in the middle of
the Synapse startup. Is this observation correct? Is this on purpose? Too me this looks like
a serious error.
This is a side effect of the historical and now burned-in dependency on 
Axis2.. In Synapse, the startup script actually starts Axis2, and then 
again gets triggered on the startup of Axis2, for the actual Synapse 
> The listeners should be started only once the whole configuration process has been successfully
finished. Otherwise traffic would be accepted even though the initialization of the configuration
(proxies, sequences, endpoints and so on) may fail.
> Here is what I have read from the code (standalone deployment):
> 1 SynapseServer.main()
> 1.1 ServerConfigurationInformationFactory.createServerConfigurationInformation(args);
> 1.2 ServerManager.getInstance();
> 1.3 ServerManager.init()
> 1.3.1 SynapseControllerFactory.createSynapseController(configurationInformation);
> 1.3.2 ServerManager.doInit()
> Axis2SynapseController.init()
> Axis2SynapseController.createNewInstance()
> Axis2SynapseController.createConfigurationContextFromFileSystem()
> create and Init Listener Manager
> start transports <--- this looks terribly wrong
> Axis2SynapseController.initDefaults()
> Axis2SynapseController.addDefaultBuildersAndFormatters(configurationContext.getAxisConfiguration());
> Axis2SynapseController.loadMediatorExtensions();
> Axis2SynapseController.setupDataSources();
> 1.4 ServerManager.start()
> 1.4.1 ServerManager.assertInitialized()
> 1.4.2 ServerManager.doInit()
> 1.4.3 ServerManager.doStart()
> Axis2SynapseController.createSynapseConfiguration();
> Axis2SynapseController.createSynapseEnvironment();
> Axis2SynapseController.setupSynapse()
> Axis2SynapseController.addServerIPAndHostEnrties();
> Axis2SynapseController.setupMainMediation();
> Axis2SynapseController.setupProxyServiceMediation();
> Axis2SynapseController.setupEventSources();
> SynapseConfiguration.init()
> --> up to this point a lot of errors can occur resulting in "Synapse startup failed"
> Why don't we start listeners only if we reach this point without an error?
Since we have no control in the startup of Axis2, as from the pov of 
Axis2, Synapse is just a module
> I would propose to start the listeners immediately before the log output:
> ServerManager - Ready for processing
> Is there anything which will prevent this to work? If not I would be willing to work
on a patch.
I do not think this would be possible.. but please feel free to explore 
any possibilities


Asankha C. Perera

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message