J2EEServerInfo senv = getServerEnvironment();
if ("standalone".equals(senv.getServerName()) || "test".equals(senv.getServerName()))
{
try
{
MockServletContext scontext = new MockServletContext(name);
pcontainer = new PortalContainer(this, scontext);
final PortalContainer currentPortalContainer = pcontainer;
SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>()
{
public Void run()