From MINA sources you can see that unbindAll calls method unbind(address)
and if address is null, then NPE("address") will be thrown

Probably acceptor was not bound to some address.
You can rewrite your shutdown method to something like this:

     if (acceptor != null && acceptor.isManaged(socketAddress))
     {
        acceptor.unbindAll();
     }

And add traces to handle that process.




----- Original Message ----- From: "Krishna Chovdry" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, July 15, 2008 8:30 AM
Subject: Server Shutdown


Hi all,

I am using mina-1.1.7 version. I have written a method to shutdown the
server, but it is not working. The method is

public boolean shutdown() {
       acceptor.unbindAll();
       return false;
}

Though I declared acceptor as static.I am unable to get acceptor object. It
is throwing NullPointer Exception.

Can someone help me regarding this.

Thanks
Krish


Reply via email to