The Notifier API previously found in the Payara Community Edition has now been added to the April Payara Enterprise 5.27.0 release, including backwards compatibility and the ability to create your own notifiers.
The notification service received a major overhaul in Payara Server Community 5.2020.5 (October 2020) which made it possible to implement new notifiers in a modular fashion. The overhaul also involved rewriting the existing notifiers as extensions and porting them over to a new community repository.
The modular design allows developers to create their custom Notifier and plug it in into the Payara Platform.
We provide step by step directions in our Community documentation for creating your own notifiers, including:
- how to define the maven packaging
- where to find the Payara-specific plugins required to generate the correct OSGI module
- installation and configuration instructions
- Notifier Asadmin Commands
- Notifier code to implement the notifier
- how to set up and use the optional plugin for the Admin Console
What's Required to Create Your Own Notifiers in Payara Enterprise?
The process for creating a notifier in Payara Enterprise follows the same pattern as above.
You will need also need a class defining the configuration, Asadmin commands to read and write the configuration, including activating the plugin, the notifier which writes the notification event to the channel you wish to implement, and if you want to manage your notifier with the Payara Server Admin Console, you'll need a plugin.
Next, you'll need to set up your project. To integrate with the Payara Platform, your notifier must be an OSGI bundle containing the configuration class, the Asadmin commands, and the notifier. A second module contains the optional plugin for the Admin Console.However, the dependencies used will be Payara Enterprise, rather than the Community Edition.