This guide describes a comprehensive procedure for installing, configuring, and building an IBM® WebSphere® Portal V5.1 cluster.


With Apache Pluto, Java™ developers have a freely available tool for testing whether their portlets comply with the JSR 168 Portlet Specification. This article takes you thru the steps of, install Pluto and build, compile, package, and deploy a simple portlet to Pluto to test it for JSR 168 compliance. You'll also get a hint of what's in store for the next version of the Portlet Specification.


CMS Watch has release the Enterprise Portal Report that provides a comprehensive overview of Enterprise Portal products and best practices, including comparative surveys of 13 Enterprise Portal products, as well as short descriptions of several other vendors.

The vendors covered are

Infrastructure Vendors
BEA: WebLogic Portal
BEA: AquaLogic User Interaction (Plumtree G6)
IBM: WebSphere Portal Server
Microsoft: SharePoint Portal Server
Oracle: Oracle Portal
SAP: SAP Enterprise Portal
Sun: Sun Java System Portal Server

Specialty Portal Products
ATG: ATG Portal
Broadvision: Broadvision Portal
Vignette: Vignette Portal

Major Open-Source Portals
JBoss: JBoss Portal
Liferay: Liferay Portal
Plone: Plone

I had quoted an execellent article on J2EE clustering here. Recently, I came across another article from the same author on Do's and Don'ts when designing your application for a Clustering environment. Check out the same here.

Sometime back, I have written about using the Portlet Services here. To create and deploy the Portlet Services, please check out the article here.


Sharing data across portlets usually leads us to the use of session objects. Most of the best practices recommend not overloading or overusing the session object, as it can be detrimental to the health of the application and the server.

So, what ways are provided by the WebSphere Portal Server to share the data across the portlets?

As per the JSR 168 spec, the PortletSession objects must be scoped at the portlet application context level. Each portlet application has its own distinct PortletSession object per user session. The portlet container must not share the PortletSession object or the attributes stored in it among different portlet applications or among different user sessions.

The setAttribute method of the PortletSession interface binds an object to the session into the specified scope.

*************************************************************
PortletSession session = request.getPortletSession();

session.setAttribute("app-scope-attribute", "value", PortletSession.APPLICATION_SCOPE);
session.setAttribute("portlet-scope-attribute", "value", PortletSession.PORTLET_SCOPE);
session.setAttribute("no-scope-attribute", "value");
*************************************************************



Filed in:

The command caching feature in WAS provides the ability to actively cache the results of EJB methods. Storing commands in a cache for reuse by subsequent callers allows requests to be handled in the business logic tier rather than in the data tier, where processing is more expensive.

This tutorial demonstrates how to use WSAD to build, deploy and run an enterprise application that uses the new command caching functionality in WAS.

If servlet caching is enabled on the application server, the portlet cache holds the complete output of the portlet by portlet state. As a result, the portal server calls the portlet's service or render methods when the user changes the portlet state.


To enable local caching, check the Enable Servlet Caching option in the administrative console for the application server.

The portlet indicates how long, in seconds, its output should be cached in the portlet deployment descriptor.

JSR 168 cache settings
< expiration-cache > 300 < /expiration-cache >

A value of -1 indicates that the portlet cache never expires. A value of 0 indicates that the portlet is never cached, which is also the behavior if the portlet descriptor does not provide cache settings.

Modifying the local cache at runtime

For JSR 168, the portlet window can modify the expiration time at runtime by setting the EXPIRATION_CACHE property in the RenderResponse, as follows:

RenderResponse.setProperty(
PortletResponse.EXPIRATION_CACHE,
(new Integer(3000)).toString() );





The following code snippet shows how to render a breadcrumb trail that shows the current selection path.
****************************************************************





<%@ taglib uri="/WEB-INF/tld/portal.tld" prefix="portal" %>

<%@ page import="com.ibm.portal.model.NavigationSelectionModelHome" %>

<%@ page import="com.ibm.portal.model.NavigationSelectionModelProvider" %>

<%@ page import="com.ibm.portal.navigation.NavigationSelectionModel" %>

<%@ page import="com.ibm.portal.navigation.NavigationNode" %>

<%@ page import="com.ibm.portal.ModelException" %>

<%@ page import="java.util.Iterator" %>

<%@ page import="javax.naming.InitialContext" %>

<%@ page import="javax.naming.Context" %>

<%@ page import="javax.naming.NamingException" %>


<%

try{

  Context ctx = new InitialContext();

  NavigationSelectionModelHome home = (NavigationSelectionModelHome)

  ctx.lookup("portal:service/model/NavigationSelectionModel");

  if (home != null) {

    NavigationSelectionModelProvider provider =

    home.getNavigationSelectionModelProvider();

    NavigationSelectionModel model =

    provider.getNavigationSelectionModel(request, response);

    for (java.util.Iterator i = model.iterator(); i.hasNext(); )

    {

      NavigationNode node = (NavigationNode) i.next();

      if (i.hasNext()) {

        %>

        <a href="<portal:navigationUrl type="link" varname="<%=node%>"/>">

        <portal:title varname="<%=node%>"/>

        </a>

        <

        <%

      }

      else

      {

      %>

      <wps:title varname="<%=node%>"/>

      <%

      }

    }

  }

}

catch (ModelException mx) {

%>

< p> < span style="color:#ff0000">A model exception occured</span></p>

<%

}

catch (NamingException nx) {

%>

< p > < span style="color:#ff0000"> A naming exception occured</span></p >

< %

}

%>


****************************************************************

The example uses a JNDI lookup to obtain the navigation selection model. The model is then iterated and for each node a title is produced using the <portal:title/> tag. Until the last node is reached the <portal:navigationUrl/> tag is used to generate links to the referenced pages. The code can be put in
the WebSphere Portal default theme (Default.jsp)


Filed in:

IBM is planning to release WPS 6 sometime about in 3rd Quarter 2006. I recently had a chance to check out some of the new features, WPS 6 will be getting shipped with.

* Updated Themes and Skins, Roll over menus
* Adding portlets have become easy. Now, one can easily drag and drop the same on to the page
* Document Manager look and feel have been updated. Out goes the drab look of the earlier Document Manager Portlet
* The Portlet search has been improved and ability to integrate better with external search engines
* After the BowStreet acquisition by IBM, the same have been integrated in WPS. So, now you have the WebSphere Portal Factory and Portal Application Templates to jump start your portlet development
* The WCM component has also undergone the look and feel change, with simplified administration and the same has been integrated with portal administration
* Portal Personalization has been improved, now the personalization rules can be applied to both portlets and portal pages
* Another new feature is the ability to bind the WPS with multiple LDAP's. This will go a long way in helping the user management.
* Improvements have been made in terms of scalability and performance of portal sites

Must say, exciting times are ahead for the WPS folks. I am eagerly waiting for the release of WPS 6.

Filed in:

Interested in becoming an IBM Certified Associate Developer? This series of seven tutorials helps you prepare for the IBM certification Test 255, Developing with IBM Rational Application Developer for WebSphere Software V6.

WPS 5.1 has introduced Puma SPI (Service Provider Interface) for accessing the information about the WPS users and groups. The PUMA SPI provides interfaces for accessing the profiles of a portal user or group. You can use it to find, create, modify, and delete users and groups, as well as profile information about the currently logged-in user.

You can download the Javadoc of the complete SPI from here.

Filed in: