Version 6.0.1 and later WebSphere

 

Portal Express, Version 6.0
Operating systems: i5/OS, Linux, Windows

 

Deploying portlets common to a cluster

This section describes two methods of deploying portlets common across clusters

There are two ways to deploy a portlet application that is intended to be shared across multiple clusters.

  1. One is to deploy the portlet as a standard EAR through Deployment Manager, then notify each portal cluster. A pre-deployed application can only be updated by updating the EAR file in WebSphere Application Server and subsequently updating the contained WAR file in portal by using the XML configuration interface. Cross updates of a pre-deployed EAR file with a real WAR and vice versa are not possible.

  2. The second is to install it as a standard portlet within one portal cluster, then map the underlying enterprise application to the other cluster and use XMLAccess to notify the other portal cluster.

For simplicity and ease of administration, common portlet applications should be administered as standard EARs first, so there is no need to remember which portal cluster owns the original deployment. The procedure below reflects this as a best practice, and serves as the basis for subsequent sections describing how to update and delete common portlets.

 

Pre-deploying the portlet as a standard EAR

WebSphere Portal Express provides the ability to deploy portlets like any other EAR through WebSphere Application Server. This allows portlets to be combined with other EAR resources, such as Web services, EJBs, or other Web modules. After deploying such an EAR, XMLAccess must then be used to register the portlet, using the predeployed attribute on the <web-app> element. See Deploying J2EE resources with portlet application WAR files for more details on how to use the predeployed attribute.

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

<web-app action="update" active="true" uid="com.ibm.wps.portlets.welcome" predeployed="true">
    <url>file://c:/ibm/WebSphere/PortalServer/installedApps/WelcomePortlet.ear/WelcomePortlet.war</url>
    <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>

  1. In this case, follow these steps:

    1. Install the EAR through Deployment Manager, using either the Applications > Install New Application option within the Administration Console, or the AdminApp install command within the wsadmin scripting client.

    2. Map the application to each cluster where it is to run, using either the MapModulesToServers option of the AdminApp install command 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 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 XMLAccess application to import a portlet definition into each portal 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 XMLAccess import, and as a result all cluster members receive the update.

 

Parent topic:

Version 6.0.1 and later Deploying portlets in multiple clusters