将Liferay portlet配置为事件的侦听器和发布者
我使用的是Liferay 6.1,我有一个portlet,它目前是事件的发布者。在portlet.xml中,我有将Liferay portlet配置为事件的侦听器和发布者,liferay,ipc,portlet,Liferay,Ipc,Portlet,我使用的是Liferay 6.1,我有一个portlet,它目前是事件的发布者。在portlet.xml中,我有 <supported-publishing-event> <qname xmlns:x="http://localhost/search">x:ipc.eventName</qname> </supported-publishing-event> x:ipc.eventName 事件是在响应中设置的,我有另一个成功接收事件
<supported-publishing-event>
<qname xmlns:x="http://localhost/search">x:ipc.eventName</qname>
</supported-publishing-event>
x:ipc.eventName
事件是在响应中设置的,我有另一个成功接收事件的portlet。我希望publisher portlet接收的值与它必须是监听器和发布器的值相同,并且它应该接收它已发布的事件
我的问题是,JavaPortlet规范是否允许将Portlet配置为两者兼有?如果是,是否有什么不同于portlet只是发布者的做法?可以发布和使用事件-我不知道有任何限制,例如,它可以是同一事件。你需要
<supported-processing-event>
<qname xmlns:x="http://localhost/search">x:ipc.eventName</qname>
</supported-processing-event>
x:ipc.eventName
关于顺序-在portlet.xml中哪一个先到:我不记得了,您必须试试。注意:它们看起来非常相似,但一个受支持--处理-event,而另一个受支持--发布-event。在调试情况下,这几次让我感到痛苦。谢谢您的回复。我有另一个portlet,它正在成功地接收事件。processing标记位于publishing标记的前面,但由于某些原因,它仍然不起作用。如果portlet确实可以使用它自己发布的事件,那么您应该检查规范(我没有检查这个特定项目)。JSR-286实际上可读性很强,所以这是一个真正的选择。