river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Firmstone <peter.firmst...@zeus.net.au>
Subject DiscoveryAdmin, Reggie and Unicast discovery port.
Date Sat, 22 Feb 2014 00:38:51 GMT
I'm currently getting a number of test failures where a port passed in 
by configuration is already in use.  If the port specified is 0, then an 
arbitrary port is selected if 4160 is not available.

However Reggie throws an exception during construction if a configured 
port is in use.

I'd like to change Reggie to use an arbitrary port if a configured port 
is in use, this then allows an admin to try a range of ports, using 
DiscoveryAdmin, so a port in use failure isn't terminal, but instead a 
minor inconvenience.

Regards,

Peter.

net.jini.discovery.DisoveryAdmin states:

     /**
      * Changes the number of the port on which the lookup service is 
currently
      * listening for unicast discovery queries to the given port number.
      * If a value of zero is input, then the lookup service will first try
      * to listen on the standard unicast discovery port, but if that fails,
      * the lookup service will listen on an arbitrary port.
      *
      * @param port <code>int</code> representing the new port number on 
which
      *             the lookup service should listen for unicast discovery
      *             queries.
      *
      * @throws java.io.IOException because an invocation of this method 
will
      *         result in the re-initiation of the unicast discovery 
process,
      *         which can throw an <code>IOException</code> when socket
      *         allocation occurs.
      *
      * @throws java.rmi.RemoteException typically, this exception 
occurs when
      *         there is a communication failure between the client and the
      *         server.
      */
     public void setUnicastPort(int port) throws IOException, 
RemoteException;
}

Mime
View raw message