The way management server works is that the container (jetty, tomcat, jboss and 
whatnot) reads a web.xml (ref: client/WEB-INF/) and starts them up.
Based on some url pattern a http request is rerouted to them and handled.

What is the use of com.cloud.servlet.RegisterCompleteServlet and do we need it?
        
<servlet>
        <servlet-name>registerCompleteServlet</servlet-name>
        <servlet-class>com.cloud.servlet.RegisterCompleteServlet</servlet-class>
</servlet>

Singletons are per class loader basis and not JVM, so when a servlet 
initialises ComponentLocator (not sure if we would have an issue on javelin, 
it's got spring DI) which in turn loads other things, and as the compiled 
binaries are in the same war artifact, all contexts would share the same static 
variable, the problem is ComponentLocator would have the plugin maps which is a 
HashMap (_pluginsMap is non-static) and therefore would be different for each 
servlet.

The issue I've faced myself is that the pluggable services (plugins) which 
should have been singleton are per context and the plugins would be initialised 
twice (putting a logging statement in one of the plugins, viz. 
plugins/api/discovery confirmed it).

Regards.

Reply via email to