0
votes

I'm using Liferay 6.1 and I have a portlet that is currently a publisher of events. In portlet .xml I have

<supported-publishing-event>
    <qname xmlns:x="http://localhost/search">x:ipc.eventName</qname>
</supported-publishing-event>

The event is set in response and I have another portlet that receives the event successfully. I want the publisher portlet to receive the same values for which it would have to be a listener as well as publisher and it should receive the event it has published.

My question is, does the Java Portlet specification makes it possible to configure a portlet to be both? If yes, is there anything I have to do differently than if the portlet was only a publisher?

1

1 Answers

1
votes

It's possible to publish and consume an event - I'm not aware of any limitation, e.g. it can be the same event. You need

<supported-processing-event>
    <qname xmlns:x="http://localhost/search">x:ipc.eventName</qname>
</supported-processing-event>

About the order - which one goes first in portlet.xml: I don't remember, you'll have to try. Note: They both look very similar, but one is supported-processing-event while the other is supported-publishing-event. In debugging situations this has bitten me a few times.