Thanks for the bug report.

It just has been fixed: http://issues.apache.org/jira/browse/DIRMINA-583

HTH,

On Fri, 25 Apr 2008 19:04:22 +0900, Alex Stumpfl <[EMAIL PROTECTED]> wrote:

Simple question, simple solution:

unlike ServerSocketChannels NioSocketAcceptors default to
"reuse address", meaning that...

acceptor.setReuseAddress(false);

... will solve the mentioned problem.

Rgds, Alex

Hi,
 I did a really simple server for testing purposes.
I figured out that I can start two of them on the same port and
wondering why I'm not getting the typical "java.net.BindException:
Address already in use" or the like?!
Both servers pretend to be "active" but only one really is.
And when I stop the "winner" the sencond one takes over...
 So, how can I get back my BindException?
Is this an NIO problem?
 Thanks! Best Regards, Alex ;)
 public class SimpleServer {
    private static final int PORT = 6597;
    public static void main(String[] args) throws IOException {
    final SocketAcceptor acceptor = new NioSocketAcceptor();
    acceptor.setHandler(new IoHandlerAdapter());
    acceptor.bind(new InetSocketAddress(PORT));
    System.err.println(acceptor.isActive());
    }
}





--
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Reply via email to