if (initialized) {
int tenantId = synapseEnvironmentService.getTenantId();
AxisConfiguration axisConfiguration = synapseEnvironmentService.
getConfigurationContext().getAxisConfiguration();
ProxyObserver observer;
if (!alreadyCreated) {
try {
registerDeployer(
synapseEnvironmentService.getConfigurationContext().getAxisConfiguration(),
synapseEnvironmentService.getSynapseEnvironment());
observer = new ProxyObserver(
synapseEnvironmentService.getSynapseEnvironment().getSynapseConfiguration(),
ConfigHolder.getInstance().getRegistryService().
getConfigSystemRegistry(tenantId));
axisConfiguration.addObservers(observer);
ConfigHolder.getInstance().addProxyObserver(tenantId, observer);
} catch (ProxyAdminException e) {
log.error("Error while initializing the proxy admin.", e);
} catch (RegistryException e) {
log.error("Error while initializing the proxy admin.", e);
}
} else {
observer = ConfigHolder.getInstance().getProxyObsever(tenantId);
if (observer != null) {
observer.setSynapseConfig(synapseEnvironmentService.getSynapseEnvironment().
getSynapseConfiguration());
}
}
}
}