8 Replies Latest reply on Mar 5, 2012 7:54 AM by Antoine Herzog

    disablePortalContainer ? what is it used for ?

    Antoine Herzog Master



      in the code of the PortalContainerConfig, there is a method to disable a Portal Container :


          * Disables a portal container if it has not yet been disabled.
          * @param name the name of the portal container to disable
         public synchronized void disablePortalContainer(String name)


      What does "disable a portal container" mean, and what is it used for ?


      I have look in the code, and in the logs, and the only place where it is really used, is in the RootContainer class :


          * Register a new portal container. It will try to detect if {@link PortalContainerDefinition} has
          *  been defined, if so it will create the portal container later otherwise we assume that we 
          * expect the old behavior, thus the portal container will be initialized synchronously 
          * @param context the context of the portal container
         public void registerPortalContainer(ServletContext context)
            SecurityManager security = System.getSecurityManager();
            if (security != null)
            PortalContainerConfig config = getPortalContainerConfig();
            if (config.hasDefinition())
               // The new behavior has been detected thus, the creation will be done at the end asynchronously
               if (config.isPortalContainerName(context.getServletContextName()))
                  // The portal context has been registered has a portal container
                  portalContexts.add(new WebAppInitContext(context));
                  if (PropertyManager.isDevelopping())
                     log.info("We assume that the ServletContext '" + context.getServletContextName()
                        + "' is not a portal since no portal container definition with the same name has been"
                        + " registered to the component PortalContainerConfig. The related portal container"
                        + " will be declared as disabled.");
               // We assume that a ServletContext of a portal container owns configuration files
               final PortalContainerPreInitTask task = new PortalContainerPreInitTask()
                  public void execute(ServletContext context, PortalContainer portalContainer)
               PortalContainer.addInitTask(context, task);
               // Ensure that the portal container has been registered
               // The old behavior has been detected thus, the creation will be done synchronously


      Does anyone have more explaination of this disabling a portal container ?


      Is there anything in the user interface of the portal, to create a portal container or to delete / remove one ?


      Any explaination or link to some documentation are welcome !


      My question is about global "how the portal works", but also for this performance question :





      JBoss Portal and GateIn (JSR-286), JSF, Richfaces, J2EE, Drools, BRMS.