Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 66673D067 for ; Mon, 14 Jan 2013 18:27:45 +0000 (UTC) Received: (qmail 55837 invoked by uid 500); 14 Jan 2013 18:27:45 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 55796 invoked by uid 500); 14 Jan 2013 18:27:45 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 55788 invoked by uid 99); 14 Jan 2013 18:27:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2013 18:27:44 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rohit.yadav@citrix.com designates 203.166.19.134 as permitted sender) Received: from [203.166.19.134] (HELO SMTP.CITRIX.COM.AU) (203.166.19.134) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2013 18:27:38 +0000 X-IronPort-AV: E=Sophos;i="4.84,468,1355097600"; d="scan'208";a="394566" Received: from banpmailmx02.citrite.net ([10.103.128.74]) by SYDPIPO01.CITRIX.COM.AU with ESMTP/TLS/RC4-MD5; 14 Jan 2013 18:27:14 +0000 Received: from BANPMAILBOX01.citrite.net ([10.103.128.72]) by BANPMAILMX02.citrite.net ([10.103.128.74]) with mapi; Mon, 14 Jan 2013 23:57:11 +0530 From: Rohit Yadav To: "cloudstack-dev@incubator.apache.org" Date: Mon, 14 Jan 2013 23:57:07 +0530 Subject: CloudStack servlet issue Thread-Topic: CloudStack servlet issue Thread-Index: Ac3yhMQRGi6SRmTrSOKlnK5ItsExtA== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org 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? =09 registerCompleteServlet com.cloud.servlet.RegisterCompleteServlet Singletons are per class loader basis and not JVM, so when a servlet initia= lises 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 binar= ies 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 f= or 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 initial= ised twice (putting a logging statement in one of the plugins, viz. plugins= /api/discovery confirmed it). Regards.=