1 Reply Latest reply on Feb 16, 2016 10:14 AM by Paul Ferraro

    Configuring a custom protocol

    Chris Ryan Newbie

      I'm setting up an infinispan server cluster and I'd like to use my own protocol for discovery.  I've had this protocol working find in an embedded infinispan setup, but I'm struggling to sort out the configuration, etc for the standalone server.


      I've verified my setup is ok, by using "TCPPING" and setting the "initial_hosts" property explicitly - this works fine.  If I try changing to "AWS_PING":


                          <protocol type="com.meltmedia.jgroups.aws.AWS_PING">

      ...properties snipped...



      I get this error:


      22:47:07,989 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 9) WFLYCTL0013: Operation ("add") failed - address: ([

          ("subsystem" => "datagrid-jgroups"),

          ("channel" => "cluster")

      ]) - failure description: "DGJGRP0016: Unable to load protocol class org.jgroups.protocols.com.meltmedia.jgroups.aws.AWS_PING"

      22:47:07,991 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) "WFLYCTL0193: Failed executing subsystem datagrid-jgroups boot operations"

      22:47:07,993 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("parallel-subsystem-boot") failed - address: ([]) - failure description: "\"WFLYCTL0193: Failed executing subsystem datagrid-jgroups boot operations\""

      22:47:07,994 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.


      It seems to be looking for the class in the package "org.jgroups.protocols" instead of using the supplied package details?


      How do I specify the class properly?  Also, is there a standard place to put the jar file for it to be found?


      I'm on Infinispan 8.1.1.Final


      P.S. I've got a modified version of AWS_PING that works with the latest Infinispan, but I might be switching to another custom protocol in the future.

        • 1. Re: Configuring a custom protocol
          Paul Ferraro Master

          By default, the value defined by the "type" attribute is resolved against the "org.jgroups" module.  To use a custom protocol (i.e. a protocol *not* contained in the default org.jgroups module, you have 2 options:

          1. Add your jar containing the AWS_PING protocol to the existing "org.jgroups" module.  To do this you'll need to edit the existing module.xml descriptor for this module (i.e. $WILDFLY_HOME/modules/system/layers/base/org/jgroups/main/module.xml).  Your jgroups subsystem configuration would look like:
            <protocol type="com.meltmedia.jgroups.aws.AWS_PING"/>
          2. Create a new module containing the AWS_PING class and its dependencies (complete with a module.xml descriptor).  This module will need a dependency on the "org.jgroups" module.  Assuming this module is named "com.meltmedia.jgroups", your jgroups subsystem configuration would look like:
            <protocol type="com.meltmedia.jgroups.aws.AWS_PING" module="com.meltmedia.jgroups"/>