Re: Code Review : issue 11984

From: Ed Burns <>
Date: Fri, 10 Dec 2010 11:33:05 -0800

SV> Glassfish allows creation of virtual servers. Virtual hosting refers
SV> to the ability to run several web sites (domains) from a single
SV> physical server machine with a single IP address. To explain a
SV> little about how one sets up a virtual host, here are a few steps :


EB> I spoke to Sheetal about this and I requested she learn more about the
EB> following things, which I don't understand.

EB> 1. In the case of virtual servers, do all the virtual servers share the
EB> same VM? Same Web App ClassLoader?

SV> They share the same VM.

EB> 2. Is it true that ConfigureListener.contextInitialized() is called once
EB> per each virtual server instance?

SV> Yes.

EB> 3. Are the contextInitialized() methods called in parallel or in serial?

SV> serial.

EB> 4. Do all the virtual servers share the same ServletContext instance?

SV> No. There is a separate ServletContext instance per web app per
SV> virtual server. For every ServletContext created, there is an
SV> InitFacesContext instance created. But the
SV> javax.faces.application.Application instance remains a singleton
SV> throughout the life of this VM. This is what I'm not sure is
SV> correct. If javax.faces.application.Application is supposed to be
SV> one per web app, then there needs to be a distinction regarding how
SV> many of these should exist w.r.t the number of virtual servers. If
SV> we introduce Application instances per web app per virtual server,
SV> just like the ServletContext instance, then we will not hit this
SV> issue 11984.

I have added some comments to the JIRA issue.


| | office: +1 407 458 0017
| homepage:               |