1 Reply Latest reply on Sep 30, 2016 6:54 PM by rhusar

    Use JGroups in a web application

    ceharris

      I’m building a web application that targets Wildfly 10, and runs in a Wildfly HA cluster. In the application, I need to do some coordination between application nodes using JGroups. It seems silly to bring JGroups into the application itself, when Wildfly already needs a correctly configured JGroups stack for its own use.

       

      I was thinking of making an extension that (through a deployment processor) adds a CDI extension to the web application to process injection points annotated with a @JGroupsChannel qualifier and inject a Channel bean. The CDI extension would be injected with JGroups services registered by Wildfly’s jgroups subsystem. Parameters on the annotation would allow the specification of the JGroups stack and channel name.

       

      Before I started down this path, I thought I’d ask if there’s a more straightforward way to accomplish this; i.e. is there a better way to make use of Wildfly’s jgroups subsystem in my web application?