OK, found it myself. Reached out to far, trying to get that IP address.

It is much easier, just have to see it ...

Here is my solution, partial code of a copy of FirstAvailable.chooseTarget():
...
  |       if (targets.size() == 0)
  |          return null;
  | 
  |       String prefServer = System.getProperty("my.prefserver");
  |       if (prefServer != null) {
  |          // preferred server set, find server in targets and set it as target
  |          String serverName = null;
  |          Object targetObj=null;
  |          for (Iterator it = targets.iterator(); it.hasNext();) {
  |             try {
  |                targetObj = it.next();
  |                JRMPInvoker_Stub ji = ((JRMPInvoker_Stub) targetObj);
  |                serverName = ji.getServerHostName();
  |                log.debug("Found server in cluster "+serverName);
  |             } catch (Exception ex) {
  |                log.error("Exception hit ", ex);
  |             }
  |             if (serverName.equals(prefServer)) {
  |                log.debug("Set server! " + serverName);
  |                this.electedTarget = targetObj;
  |             }
  |          }
  |       }
  | ...
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839280#3839280

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839280


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to