19.2. Accessing portlet services

Because of the inherit differences in the two portlet APIs, accessing portlet services in each API is different

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
);

19.2.2. Accessing a portlet service in a JSR 168 portlet ...

Get IBM Rational Application Developer V6 Portlet Application Development and Portal Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.