You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Hanson Char <ha...@gmail.com> on 2006/09/23 07:10:29 UTC

Detect Address Binding Failure

Hi,

AFAIK, the address binding by a SocketAccetpor in Mina 0.8.2 is done
asynchronously.  If the port is already in use, the binding would fail
of course.

Is there anyway the application can detect such failure, so that it
can initiate some actions to handle it (such as exiting the JVM, or
try another port, etc.) ?

Thanks in advance.

Hanson

Re: Detect Address Binding Failure

Posted by Hanson Char <ha...@gmail.com>.
Well I guess I can use Thread.setDefaultUncaughtExceptionHandler(...)

Hanson

On 9/22/06, Hanson Char <ha...@gmail.com> wrote:
> Hi,
>
> AFAIK, the address binding by a SocketAccetpor in Mina 0.8.2 is done
> asynchronously.  If the port is already in use, the binding would fail
> of course.
>
> Is there anyway the application can detect such failure, so that it
> can initiate some actions to handle it (such as exiting the JVM, or
> try another port, etc.) ?
>
> Thanks in advance.
>
> Hanson
>