2 Replies Latest reply on Sep 26, 2005 4:09 PM by plindsay

    obtaining IP for targets in loadbalance policy

    peterb

      I'm trying to develop a custom LoadBalancePolicy that selects targets based on their location within the network (for instance servers within the local subnet will probably be faster, also hopcount might matter). However, for this I need to obtain the IP address of the different targets. Is there an easy way to do this?

      The only possibility I've currently found is to parse the output of the "remoteToString" method on the remote reference (obtained via getRef())

      While this works this does not seem to be a very elegant solution and probably will not be very "future-proof".


      regards,
      Peter

        • 1. Re: Location for module generic but Oracle specific SQL scri
          slaboure

          You have to check first that something like : "INSERT INTO BLAH ('aaa',1,true) works, i.e work with Statement.

          Because if it does rely on PreparedStatement when you execute something your statement looks like "INSERT INTO BLAH (?,?,?)" then the proprietary driver takes care of marshalling the types when it talks to the database.

          LDBC could be used only to create portable CREATE TABLE/DROP TABLE statements. Perhaps it could work for Statement.

          • 2. Re: obtaining IP for targets in loadbalance policy
            plindsay

            Grab jboss source and check out other loadbalancepolicy implementations: e.g.,
            Object node = iter.next();
            JRMPInvoker_Stub jis = ((JRMPInvoker_Stub) node);
            jis.getServerHostName()