19.2.1 Accessing a portlet service in an IBM portlet

The IBM portlet API is tightly coupled with WebSphere Portal. The IBM portlet API has direct access to certain features that the JSR 168 API does not. To access a service in an IBM portlet you need to use the getService method on the PortletContext. Example 19-10 shows an example of accessing the MailService from an IBM portlet.

Example 19-10 Accessing MailService in an IBM portlet

IBMMailService mailService = (IBMMailService)getPortletConfig().getContext().getService(IBMMailService.class);


Redbooks
ibm.com/redbooks