7 Replies Latest reply on May 3, 2006 2:59 PM by tom.elrod

    TransporterClient

    jeanette

      Hi,

      The TransporterClient class seems to always connect to the first available server from the list of available servers returned by the NetworkRegistry. Is there a way to make sure that the TransporterClient objects are not all connecting to the same server, in order to achieve some sort of basic load balancing?

      Thanks!
      Jeanette

        • 1. Re: TransporterClient

          Not currently. Have added a feature request for it - http://jira.jboss.com/jira/browse/JBREM-422.

          • 2. Re: TransporterClient
            jeanette

            Any suggestions on a work around?
            Is it reasonable to consider the open source route, i.e. change or extend the TransporterClient class?


            Thanks,
            Jeanette

            • 3. Re: TransporterClient

              Would be great if you could make the code change to allow for load balancing (and I can commit the changes if attach to the jira issue).

              Basically, only need to make the change to TrasporterClient.findAlternativeTarget() so that instead of picking the first target it finds matching the criteria, it builds a list that matches and then has a load balancer class select which target to use.

              Let me know if you have any questions in regards to the code.

              Thanks.

              -Tom

              • 4. Re: TransporterClient
                jeanette

                Tom,
                I already played with changing the findAlternativeTarget() method exactly as you suggested, but the load balancer class just uses a random number generator to select the server to use. Not too sophisticated, but it'll do for what I am trying to accomplish.

                Is this acceptable? What's the best way to submit these changes to you?

                Thanks,
                Jeanette

                • 5. Re: TransporterClient

                  Probably easiest thing is to attach the source files to the jira issue noted above.

                  • 6. Re: TransporterClient
                    jeanette

                    I took a stab at providing support for a pluggable LoadBalancer in the TransporterClient. The files are attached with the jira.

                    I am using the TransporterClient from an EJB, and I need the ability to stop the detector thread when my application is undeployed. ( I am not using JBoss AS currently).

                    So in the version of the TransporterClient that I submitted, I also added a method called destroyDetector() to call the stop() method from the MulticastDetector and to unregister the mbeans.
                    Then, I changed the destroyTransporterClient() method to optionally call the destroyDetector. Does this make sense?

                    Thanks,
                    Jeanette

                    • 7. Re: TransporterClient

                      Thanks Jeanette. I have added the code. There is actually going to be a lot of work done on transporters for this release (2.0.0), so keep an eye out for changes.

                      Thanks again for your help.

                      -Tom