3 Replies Latest reply on Aug 17, 2015 10:02 AM by Radoslav Husar

    Create a JChannel (JGroups) with Protocol Stack from Subsystem configuration

    Adrian Bader Newbie

      I use an own JChannel to send messages between the JVM nodes in a cluster:

       

      JChannel channel;
      
      public void start()
      {
         try
         {
         log.info("JGroups: Starting channel 'WebSocketListener'");
         channel = new JChannel();
         channel.setReceiver(this);
         channel.connect("WebSocketListener");
        }
         catch (ChannelException e)
        {
         log.error("JGroups: Error starting channel.", e);
        }
      }
      

       

      However, channel = new JChannel() does always try to create an udp channel, even if I configured a tcp protocol stack as default stack in the subsystem configuration (standalone.xml).

       

      How can I create a channel using the settings of the subsystem configured in standalone.xml? Or do I need to re-define these settings and create the JChannel with these settings?

       

      Thanks in advance for your help!

      - a.bader