04-27-06 01:07 PM
> Hi,
>
> Each portlet in a portal gets a separate
> e PortletSession. So this cannot be used for IPC ? Is
> this right ?
Please, define IPC. What does it mean?
> Why can't I use PortletSession or PortletContext to
> share data between portlets ?
In order to share data between portlets you can use PortletContext. But thes
e portlets must be together in the same portlet application. Anyway, what ki
nd of data are you referring to? Can it be achieved by executing simple getA
ttribute() and setAttribute
() methods of PortletContext object?
> Can anybody correct these ideas ? If I add two
> portlets to a portal in RAD then it is deployed as a
> single web application. Right ?
Who defines if the portlets will be in only one application or will be separ
ated in two or more web applications is you. You define it, when you create
a portlet project in RAD. Each portlet project in RAD represents one web app
lication. An advantage of p
utting two or more portlets in the same project, and therefore, in the same
web application, is that you can share data between these portlets, that I s
uppose is your objective, isn't it? You can share data using, for example, P
ortletContext.getAttribute(
) and PortletContext.setAttribute() method. There are other ways to share da
ta, of course. But the point is: you only can share if the portlets are toge
ther in the same web application. Otherwise, you cannot. Are you aware about
this?
> If so then
> PortletSession can be used to share data.
No. Unless you want to share data of the same user who is logged in Portal.
If you want to share data between different users in Portal, you have to use
PortalContext object.
[ Post a follow-up to this message ]
|