Unbind not working ?

This is a discussion on Unbind not working ? within the Apache forums in Application Servers & Tools category; I'm using MINA 2.0.0 M2 , java 1.6. The problem is that IoAcceptor.unbind() doesn't seem to work . The clients are not disconnected ( the disconnect is set ), and the port is not released at all. Even after closing the program, the port is still used and freed on a later time by the operating system. My code for the unbinding operation is : try { acceptor.unbind(new InetSocketAddress(portValue)); } catch(Exception exception) { exception.printStackTrace(); } acceptor is an IoAcceptor object, also, there is no exception. I tried to browse the sources but I couldn't find the bind0 method used for ...

Go Back   Application Development Forum > Application Servers & Tools > Apache

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-18-2008, 06:13 AM
Eugen
Guest
 
Default Unbind not working ?

I'm using MINA 2.0.0 M2 , java 1.6.
The problem is that IoAcceptor.unbind() doesn't seem to work . The clients
are not disconnected ( the disconnect is set ), and the port is not released
at all. Even after closing the program, the port is still used and freed on
a later time by the operating system.
My code for the unbinding operation is :
try
{
acceptor.unbind(new InetSocketAddress(portValue));

}
catch(Exception exception)
{
exception.printStackTrace();
}

acceptor is an IoAcceptor object, also, there is no exception.
I tried to browse the sources but I couldn't find the bind0 method used for
unbinding, only in some abstract version that needs implementing.
Maybe I'm doing something wrong ?

Thanks a lot

Reply With Quote
  #2  
Old 07-20-2008, 07:34 PM
Mark Webb
Guest
 
Default Re: Unbind not working ?

Could you please provide a sample program that demonstrates this behavior?

Thanks

On Fri, Jul 18, 2008 at 6:13 AM, Eugen <pupicutz2000-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> I'm using MINA 2.0.0 M2 , java 1.6.
> The problem is that IoAcceptor.unbind() doesn't seem to work . The clients
> are not disconnected ( the disconnect is set ), and the port is not
> released
> at all. Even after closing the program, the port is still used and freed on
> a later time by the operating system.
> My code for the unbinding operation is :
> try
> {
> acceptor.unbind(new InetSocketAddress(portValue));
>
> }
> catch(Exception exception)
> {
> exception.printStackTrace();
> }
>
> acceptor is an IoAcceptor object, also, there is no exception.
> I tried to browse the sources but I couldn't find the bind0 method used for
> unbinding, only in some abstract version that needs implementing.
> Maybe I'm doing something wrong ?
>
> Thanks a lot
>


Reply With Quote
  #3  
Old 07-22-2008, 04:20 AM
Eugen
Guest
 
Default Re: Unbind not working ?

Hi,


After more tests, it seems that it's more of a platform issue. While on
windows, it works fine, on Linux and Solaris, the problem appears. On linux
( I tested on Kubuntu 8 and Suse 10.3 ) , my tests indicate that the OS is
releasing the ports after a minute or so, while on Solaris the ports remain
in use until system reboot.
I mention that this problem does not appear with mina 1.1.7 which I
previously used.
I don't know what piece of code I might be adding to this mail to make
things clear, so I give you the svn checkout address for my source :
http://dshub.svn.sf.net/svnroot/dshub/trunk
The file that starts the mina server and handles port adding/removing is
HubServer.java and the IoHandlerAdapter subclass is SimpleHandler.java

Thanks for helping out

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:03 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.