+

Search Tips   |   Advanced Search


Deploy portlets common to a cluster


Overview

You can deploy portlets to a cluster as a standard EAR using the Deployment Manager.

Pre-deployed applications can only be updated by...

Cross updates of a pre-deployed EAR file with a real WAR and vice versa are not possible. You can also install it as a standard portlet within one cluster, then map the underlying enterprise application to the other cluster and use the XML configuration interface to notify the other cluster members.

For ease of administration, common portlet applications should be administered as standard EARs first, so there is no need to remember which cluster owns the original deployment.


Deploy common portlets

  1. Install the EAR through Deployment Manager, using either...

      Applications | Install New Application

    ...or AdminApp. This allows portlets to be combined with other EAR resources, such as Web services, Enterprise Java Beans, or other Web modules.

  2. Map the application to each cluster where it is to run, using either the MapModulesToServers option of AdminApp within the wsadmin scripting client, or the Map modules to servers option under that application’s entry under Applications > Enterprise Applications.

  3. Synchronize the new application with each node in all clusters, and then start the application in each cluster. By default, synchronization will automatically occur with each node hosting servers and cluster members, or both, to which the enterprise application is mapped.

  4. Use the XML configuration interface to import a portlet definition into each cluster using the predeployed attribute, where the <url> element of the <web-app> points to the binaries directory where the portlet application's WAR contents are contained. Choose only one cluster member in a cluster against which to run the XML configuration interface, and as a result all cluster members receive the update.

Here is an example XML definition for importing a pre-deployed portlet application using the XML configuration interface:

<web-app action="update" 
         active="true" 
         uid="com.ibm.wps.portlets.welcome" 
         predeployed="true">

    <url>file://C:/IBM/WAS61/PortalServer/installedApps/WelcomePortlet.ear/WelcomePortlet.war</url>

    <!-- The context root that is assigned to the web application of the portlet application 
         in the predeployed EAR file (reference: application.xml). The context-root 
         in this XML file must match with the context-root in the application.xml file.   -->
    <context-root>my/context/root</context-root>

    <!-- The name that is assigned to the application in the predeployed EAR file 
         (reference: application.xml). -->
    <display-name>My_Web_App</display-name>

    <portlet-app action="update" 
                 active="true" 
                 uid="com.ibm.wps.portlets.welcome.1">

        <portlet action="update" 
                 active="true" 
                 objectid="theIbmPortletApiPortlet" 
                 name="Welcome Portlet"/>
    </portlet-app>
</web-app>


Parent topic:

Manage portlets in the cluster