Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
subrat kumar mishra
Ipc
September 23, 2012 12:26 PM
Answer

subrat kumar mishra

Rank: New Member

Posts: 13

Join Date: September 3, 2012

Recent Posts

pls send me a ipc session based exampple,i send two portlet pls cheak it reply me not getting th out put
Attachments: portlet a.docx (11.8k), portlet b.docx (11.5k)
Harish Kumar
RE: Ipc
September 23, 2012 10:24 PM
Answer

Harish Kumar

Rank: Expert

Posts: 324

Join Date: July 31, 2010

Recent Posts

Hi Subrat,

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

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


To set attribute -

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


To get attribute -

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


HTH
Mazhar Alam
RE: Ipc
September 24, 2012 5:36 AM
Answer

Mazhar Alam

Rank: Regular Member

Posts: 188

Join Date: November 25, 2011

Recent Posts

Thats nice Subhash!!
David H Nebinger
RE: Ipc
September 24, 2012 6:20 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 5763

Join Date: September 1, 2006

Recent Posts

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).
Rahul Pande
RE: Ipc
September 25, 2012 4:52 AM
Answer

Rahul Pande

Rank: Regular Member

Posts: 218

Join Date: July 6, 2010

Recent Posts

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
RE: Ipc
September 28, 2012 8:24 AM
Answer

subrat kumar mishra

Rank: New Member

Posts: 13

Join Date: September 3, 2012

Recent Posts

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
Jack Bakker
RE: Ipc
September 29, 2012 9:28 AM
Answer

Jack Bakker

Rank: Expert

Posts: 464

Join Date: January 3, 2010

Recent Posts

If I remember correctly the Liferay in Action book introduces IPC rather well
Rehan Pathan
RE: Ipc
May 13, 2013 11:50 PM
Answer

Rehan Pathan

Rank: New Member

Posts: 7

Join Date: January 30, 2013

Recent Posts

hi,
Another example for ipc you can check on following
attuneinfocom/how-create-ipc-portlet-liferay-611-ga2-0