Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Enrico Oliosi
Portlet Events: synchronous or asynchronous?
September 17, 2012 6:19 AM

Enrico Oliosi

Rank: Junior Member

Posts: 41

Join Date: July 6, 2010

Recent Posts

I read that Portlet Spec 2.0 allow you to send event between portlets so they send each other a payload (a serializable object).
I would like to know if this comunication is synchronous or asynchronous.
For example if i have this snippet
 3public void myAction(ActionResponse res, ... ) throws ...
 5  [...]
 6  response.setEvent(...); // event 1
 7  [...]
 8  response.setEvent(...); // event 2

when I send event 1, does sender portlet wait a response from portlet(s) that manage event 1 or portlet container
sends event 2 without waiting response of receiver portlet(s) on event 1?

Thx a lot to all-
Harish Kumar
RE: Portlet Events: synchronous or asynchronous?
September 17, 2012 8:42 AM

Harish Kumar

Rank: Expert

Posts: 474

Join Date: July 31, 2010

Recent Posts


No, sender portlet won't wait for response and events will generate in the order specified. Portlet events are like broadcast and they are not even guaranteed to be delivered because no queue is maintained for them.


Participate in the State of Liferay Community 2017. Help the community and even win some prizes!