/payara-micro-remote-cdi-event-demo

Demo the remote CDI event of Payara Micro

Primary LanguageJava

Official guide

https://payara.gitbooks.io/payara-server/content/documentation/extended-documentation/cdi-events.html

Reproduce steps

  1. cd to the payara-micro-remote-cdi-event-demo folder
  2. package first

$ mvn clean package

  1. start 3 instances by execute the following command

$ mvn exec:exec

  1. execute

$ curl http://localhost:8080/payara-micro-remote-cdi-event-demo/?msg=clustered-msg

  1. check the console
  2. you would find that the sender instance would NOT receive the event
  3. curl http://localhost:8080/payara-micro-remote-cdi-event-demo/loop-back?msg=loop-back-clustered-msg
  4. check the console
  5. you would now see the sender instance will receive the event..