Is it possible to observe a CDI Event inside a WAR when packaged as EAR

╄→尐↘猪︶ㄣ 提交于 2019-12-03 14:54:51

After some more research it seems that its expected behaviour because WAR classes are not visible to EJBs.

Thinking more about it this is a good thing - in a clustered environment the CDI Event would be received only by the WAR running on the same node as the EJB module firing the event. But to reliable update the users view, we need to receive it on every instance.

JMS or another Messaging system is clearly the way to go in this case. There is also a CDI Extension available for CDI <-> JMS bridging: Seam3 JMS

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!