Hi Frank, On 14-Jan-2013, at 11:22 AM, Frank Zhang <frank.zh...@citrix.com> wrote:
> From the url mapping it seems to be used for mycloud which is obsolete I > think Should we remove it and get rid of the servlet class then? > _pluginsMap is non-static but s_locators is. ComponentLocator. getLocator > which essentially calls > ComponentLocator .getLocatorInternal will synchronize on s_locators, that > means ComponentLocators > having the same name should not be initialized twice. So pluggable services > twice initialized should be > caused by some other issue. Looking at the code, we are getting a component by ConfigurationServer.Name and then by ManagementServer.Name, and from debugging earlier I'd found the issues with this code; ConfigurationServer c = (ConfigurationServer)ComponentLocator.getComponent(ConfigurationServer.Name); //ConfigurationServer c = new ConfigurationServerImpl(); try { c.persistDefaultValues(); s_locator = ComponentLocator.getLocator(ManagementServer.Name); ManagementServer ms = (ManagementServer)ComponentLocator.getComponent(ManagementServer.Name); > I don't know where does our Spring IOC get initialized, but if > ComponentLocator is loaded by spring with a name other than > ManagementServer.Name, > then there would be two copies of ComponentLocator which load all plugins > twice For javelin ComponentLocator is no more and starting that we will use spring DI and for getting components without @Inject I've seen usage of a new ComponentContext. Regards.