[
http://issues.apache.org/jira/browse/DIRMINA-152?page=comments#action_12362121
]
Alessandro Torrisi commented on DIRMINA-152:
--------------------------------------------
OK RESOLVED !
final ServiceRegistry registry = new JxHubServiceRegistry();
registry.getAcceptor(TransportType.SOCKET).setDisconnectClientsOnUnbind(true);
((SocketAcceptor)registry.getAcceptor(TransportType.SOCKET)).setReuseAddress(true);
Runtime.getRuntime().addShutdownHook(new Thread() {
// This method is called during shutdown
@Override
public void run() {
registry.unbindAll();
}
});
The line
((SocketAcceptor)registry.getAcceptor(TransportType.SOCKET)).setReuseAddress(true);
seems to resolve the issue ! Can you use TRUE by default ? Bye :D
> SO_REUSEADDR in 0.9 is gone ?
> -----------------------------
>
> Key: DIRMINA-152
> URL: http://issues.apache.org/jira/browse/DIRMINA-152
> Project: Directory MINA
> Type: Bug
> Versions: 0.9
> Environment: in MINA 0.9 after a violent JVM shutdown (like Eclipse stop
> button) the TCP port aren't unbinded
> Reporter: Julien Vermillard
>
> look like 0.9 is not configuring TCP port for reusing
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira