1 Reply Latest reply on Mar 9, 2007 9:56 AM by Scott Marlow

    Change to make PooledInvokerProxy.getServerHostName() return

    Scott Marlow Master

      I'm working on a prototype for integrating a HA-Singleton to a "FavorSingleton" load balancer policy (I will post in the clustering forum when it is more complete.) Its for pinning a ejb 2.x bean to a particular server that the load balancer can always find.

      If load balancing policy's work with ejb3 beans, than all the better. :)

      In my load balancing policy, I am in need of more specific information from the opaque objects passed in. I would like to be able to get something that identifies the server hostname + some port number that it is listening on.

      I'm thinking of hacking PooledInvokerProxy.getServerHostName() to return the server hostname and pooledInvokerHA listening port:

      getServerHostName() // in class PooledInvokerProxy
       {
       return address.address + ":" + address.port;
       }
      


      Or perhaps the Invoker interface could be enhanced to have a getServerPort() method. I suppose that some implementations might not have a server port number to return, so they wouldn't work with load balancer policies that need that.

      Comments?