6.5. Configuring a portal container

A portal container is defined by several attributes.

First, there is a portal container name, which is always equal to the URL context to which the current portal is bound.

Second, there is a REST context name, which is used for REST access to portal application - every portal has exactly one (unique) REST context name.

Then, there is a realm name which is the name of security realm used for authentication when users log into the portal.

Finally, there is a list of Dependencies - other web applications, whose resources are visible to current portal (via extension mechanism described later), and are searched in the specified order.

Example: Portal container declaration


<?xml version="1.0" encoding="UTF-8"?>
  <configuration
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
                         http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
     xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">

     <external-component-plugins>
        <!-- The full qualified name of the PortalContainerConfig -->
        <target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>

        <component-plugin>
           <!-- The name of the plugin -->
           <name>Add PortalContainer Definitions</name>

           <!-- The name of the method to call on the PortalContainerConfig
                in order to register the PortalContainerDefinitions -->
           <set-method>registerPlugin</set-method>

           <!-- The full qualified name of the PortalContainerDefinitionPlugin -->
           <type>org.exoplatform.container.definition.PortalContainerDefinitionPlugin</type>

           <init-params>
              <object-param>
                 <name>portal</name>
                 <object type="org.exoplatform.container.definition.PortalContainerDefinition">
                    <!-- The name of the portal container -->
                    <field name="name"><string>portal</string></field>

                    <!-- The name of the context name of the rest web application -->
                    <field name="restContextName"><string>rest</string></field>

                    <!-- The name of the realm -->
                    <field name="realmName"><string>exo-domain</string></field>

                    <!-- All the dependencies of the portal container ordered by loading priority -->
                    <field name="dependencies">
                       <collection type="java.util.ArrayList">
                          <value>
                             <string>eXoResources</string>
                          </value>
                          <value>
                             <string>portal</string>
                          </value>
                          <value>
                             <string>dashboard</string>
                          </value>
                          <value>
                             <string>exoadmin</string>
                          </value>
                          <value>
                             <string>eXoGadgets</string>
                          </value>
                          <value>
                             <string>eXoGadgetServer</string>
                          </value>
                          <value>
                             <string>rest</string>
                          </value>
                          <value>
                             <string>web</string>
                          </value>
                          <value>
                             <string>wsrp-producer</string>
                          </value>
                          <!-- The sample-ext has been added at the end of the dependency list
                               in order to have the highest priority -->
                          <value>
                             <string>sample-ext</string>
                          </value>
                       </collection>
                    </field>
                 </object>
              </object-param>
           </init-params>
        </component-plugin>
     </external-component-plugins>
</configuration>

Note

Dependencies are part of the extension mechanism.

Every portal container is represented by a PortalContainer instance, including:

Unified servlet context, and unified classloader are part of the extension mechanism (explained in next section), and provide standard APIs (ServletContext, ClassLoader) with the specific resource loading behavior - visibility into the associated web application archives, configured with Dependencies property of PortalContainerDefinition. Resources from other web applications are queried in the order specified by Dependencies. The later entries in the list override the previous ones.

See also

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus