Remote CDI Events in Payara Micro
Payara Micro can listen to and fire CDI events across the cluster of Payara Micro instances, and also across Payara Server instances within the same cluster. Payara Micro supports the same functionality for remote CDI events as provided by Payara Server.
Payara Micro also provides additional methods to fire events and register listeners programmatically.
These methods are used for firing CDI Events across running instances.
Method | Description |
---|---|
|
Adds a CDI Event Listener. |
|
Removes a CDI Event Listener. |
|
Adds a Cluster Listener. |
|
Removes a Cluster Listener. |
|
Publishes a CDI Event. |
This feature has been available in Payara Micro long before it was available in Payara Server. |
Manual initialization of the Event Bus
On prior releases, it was necessary to initialize the event bus using ClusteredCDIEventBus.initialize()
manually upon startup. Although this method is still available in the API, it is not necessary anymore, since the event bus is automatically initialized after an application is started.