return ss;
}
protected void createServerSockets() throws IOException
{
ServerSocketFactory factory = getServerSocketFactory();
Iterator it = getHomes().iterator();
while (it.hasNext())
{
Home home = (Home) it.next();
InetAddress inetAddress = getAddressByName(home.host);
ServerSocket ss = null;
try
{
ss = factory.createServerSocket();
ss.setReuseAddress(getReuseAddress());
configureServerSocket(ss);
InetSocketAddress address = new InetSocketAddress(inetAddress, home.port);
bind(ss, address, backlog);
if (log.isDebugEnabled()) log.debug(this + " created " + ss);
}
catch (SocketException e)
{
if (getReuseAddress())
log.warn("Unable to create unbound ServerSocket: cannot set reuseAddress to true");
try
{
ss = factory.createServerSocket(home.port, backlog, inetAddress);
configureServerSocket(ss);
}
catch (IOException e2)
{
String m = this + " error creating ServerSocket[" + home + "]: " + e2.getMessage();