2 Replies Latest reply on Apr 14, 2004 2:22 PM by adrian.brock

    RMIAdaptor Load balancing?

    darthjoe

      I have a partition Named "DumasPartition" with 2 nodes in the cluster.
      I have a client that accesses the services on those nodes through autodiscovery
      and the RMIAdaptor

      Failover works fine, but there doesn't appear to be any kind of load balancing, round
      robin, etc.. Is there anyway to configure the RMIAdaptor service to provide this
      functionality? I understand HAJNDI/HARMI provides this functionality, does the RMIAdaptor make use of it?

      Client code below

      Properties prop = new Properties();
      prop.put(Context.INITIAL_CONTEXT_FACTORY,
       "org.jnp.interfaces.NamingContextFactory");
      prop.put(Context.URL_PKG_PREFIXES,
       "org.jboss.naming:org.jnp.interfaces");
      prop.put("jnp.partitionName","DumasPartition");
      prop.put("jnp.discoveryGroup","230.0.0.4");
      prop.put("jnp.discoveryPort","1102");
      
      InitialContext jndiContext = new InitialContext(prop);
      
      Object ref = jndiContext.lookup("jmx/rmi/RMIAdaptor");
      RemoteMBeanServer server = new RMIConnectorImpl((RMIAdaptor)ref);
      out.println(server.getAttribute(new javax.management.ObjectName("dumas.subs:service=DownloadAuth"), "Foo"));
      



      Thanks,

      -Joe