留言板

Ipc

subrat kumar mishra,修改在11 年前。

Ipc

New Member 帖子: 13 加入日期: 12-9-3 最近的帖子
pls send me a ipc session based exampple,i send two portlet pls cheak it reply me not getting th out put
thumbnail
Harish Kumar,修改在11 年前。

RE: Ipc

Expert 帖子: 483 加入日期: 10-7-31 最近的帖子
Hi Subrat,

To share session attribute between different portlets you can make use of following property

session.shared.attributes=COMPANY_,LIFERAY_SHARED_,org.apache.struts.action.LOCALE,PORTLET_RENDER_PARAMETERS_,PUBLIC_RENDER_PARAMETERS_POOL_,USER_


To set attribute -

actionRequest.getPortletSession().setAttribute("LIFERAY_SHARED_session_attr", "Value",	PortletSession.APPLICATION_SCOPE);


To get attribute -

actionRequest.getPortletSession().getAttribute("LIFERAY_SHARED_session_attr",PortletSession.APPLICATION_SCOPE)


HTH
thumbnail
Mazhar Alam,修改在11 年前。

RE: Ipc

Regular Member 帖子: 191 加入日期: 11-11-25 最近的帖子
Thats nice Subhash!!
thumbnail
David H Nebinger,修改在11 年前。

RE: Ipc

Liferay Legend 帖子: 14915 加入日期: 06-9-2 最近的帖子
Subhash Pavuskar:
I hope This code may help you to understand IPC pls Find the attachment.


Please do not refer to this as IPC, because it's not.

IPC, in the portlet world, has a specific meaning and is based upon events and listeners at the portlet level.

All you've done in this code is set a variable in the portlet session's application scope. This is nothing more than sharing data, and is very much bad practice (want to change the portlet key? Have to touch all of your code that's using it).
thumbnail
Rahul Pande,修改在11 年前。

RE: Ipc

Expert 帖子: 310 加入日期: 10-7-7 最近的帖子
David H Nebinger:
Subhash Pavuskar:
I hope This code may help you to understand IPC pls Find the attachment.


Please do not refer to this as IPC, because it's not.

IPC, in the portlet world, has a specific meaning and is based upon events and listeners at the portlet level.

All you've done in this code is set a variable in the portlet session's application scope. This is nothing more than sharing data, and is very much bad practice (want to change the portlet key? Have to touch all of your code that's using it).



I agree with David. This is just session sharing.

Please refer this link

NOTE : In the given link also they are considering session sharing as IPC, which is not correct.
subrat kumar mishra,修改在11 年前。

RE: Ipc

New Member 帖子: 13 加入日期: 12-9-3 最近的帖子
Hello ur provided example is work within the same project two portlet communication,
But i need example of two portlets from different project communication
pls reply me
thumbnail
Jack Bakker,修改在11 年前。

RE: Ipc

Liferay Master 帖子: 978 加入日期: 10-1-3 最近的帖子
If I remember correctly the Liferay in Action book introduces IPC rather well
thumbnail
rehan khan,修改在10 年前。

RE: Ipc

New Member 帖子: 7 加入日期: 13-1-31 最近的帖子
hi,
Another example for ipc you can check on following
attuneinfocom/how-create-ipc-portlet-liferay-611-ga2-0