Tuesday, April 27, 2010

Tech: Interportlet Communication JSR168 and JSR286

JSR 168 (Potlet 1.0) specification doesn't clearly suggest any mechanism for the inter-portlet communication i.e. communication between two portlets. This was regarded as one of the major short-comings for JSR 168. Though most of the vendors had their own extensions to JSR 168 for managing inter-portlet communication, use of any of those methods defeat the very purpose of JSR 168. In absence of any well defined sophisticated mechanism, JSR 168 developer had to rely upon either PortalContext or Application Scope of Session for sharing information between the protlets.JSR 286 has come up with a well defined model to achieve inter-portlet communication. There are two primary ways by which inter-portlet communication can achieved as follows -1. Public Render Parameters2. Portlet EventsThere are pros and cons of each method. Though the biggest advantage with Portlet Events method is that an object can be passed from one portlet to another as opposed to merely "String" in case of "Public Render Parameters" method.Both the approaches has been talked about in this blog post with the implementation approach. Please have a look - http://blog.xebia.com/2009/04/19/inter-portlet-coordination-with-jsr-286/

No comments:

Post a Comment