Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1306

Custom thread factories, pools and timer overridden in Protocol.init()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 2.12.1
    • 2.12
    • None
    • Hide

      Call Protocol.init() prior to overriding pool/timer/thread factories.

      Show
      Call Protocol.init() prior to overriding pool/timer/thread factories.

      To override thread pools/factories/timer of a protocol, one must do the following:

      UDP udp = new UDP();
      udp.init(); // Creates default pools
      udp.setThreadPool(...); // Destroys default pool first

      If I try to avoid the unnecessary thread creation/destruction by the following:

      UDP udp = new UDP();
      udp.setThreadPool(...);
      udp.init();

      ... then my custom pools get overridden by the default implementations.

      Instead, Protocol.init() should check to see if implementations already exist before instantiating the default implementations.

            rhn-engineering-bban Bela Ban
            pferraro@redhat.com Paul Ferraro
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: