incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohit Yadav <>
Subject CloudStack servlet issue
Date Mon, 14 Jan 2013 18:27:07 GMT
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 and do we need it?

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).

View raw message