Options to communicate between WARs in the same EAR

后端 未结 4 453
南方客
南方客 2021-01-12 22:41

What options do you have to communicate between the WARs in an EAR? We have several WARs providing different webservices deployed within one EAR. For their tasks they need

4条回答
  •  走了就别回头了
    2021-01-12 22:46

    Two things come to mind

    1. There's JMS for sending signals.
    2. EJB could record shared information.
    3. A lib jar in the EAR's lib directory.

    If you just need shared methods, 3 is what you want. But your edit points tells me you've got shared functionality that operates on shared data. For example, you've got user records that both WARs access and update. If so, you want an EJB.

提交回复
热议问题