Hi Peter,

> How about just a variant on bind() that takes a ServerSocket(Channel) 
> rather than an IP/port combination?

This is essentially what I had done except I called this new method 'register' 
rather than 'bind' in order to reflect that the server socket had been 
previously bound, but either method name is fine by me. I also think this would 
be the simplest solution in terms of ease of use.

> As Trustin said, we can put it into the core for 2.x, but 1.1.x is 
> just in maintenance mode until we can get 2.0 out. (realizing the pain 
> it causes to continue to have delays). But do post a patch!

I understand this is probably too late for 1.1.x so we'll keep using our 
patched version in the meantime until 2.0 ships. If I file a JIRA issue as 
Trustin suggests should I include the patch there or should I post it 
separately?

Finally, I also wanted to thank both you and Trustin for the quick response!

- David

----- Original Message -----
From: "peter royal" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, February 25, 2008 7:52:46 AM GMT -08:00 US/Canada Pacific
Subject: Re: MINA and prebinding of privileged ports

On Feb 24, 2008, at 6:56 PM, David Connelly wrote:
> Unfortunately, the SocketAcceptor bind() method not only binds the  
> server socket but starts
> listening on the server channel immediately as well, which prevents  
> prebinding of the ports.
>
> Our temporary workaround has been to add a new 'register' method to
> SocketAcceptor so our application can create and bind the
> ServerSocketChannel as root, setuid to the zimbra user, then call  
> 'register'
> to allow MINA to start listening on the server socket.

How about just a variant on bind() that takes a ServerSocket(Channel)  
rather than an IP/port combination?

> Any chance something like this or similar could be added to the MINA  
> core in
> 1.1.x? This would be a big help for us so we don't have to  
> indefinitely
> maintain our own patched version of SocketAcceptor.

As Trustin said, we can put it into the core for 2.x, but 1.1.x is  
just in maintenance mode until we can get 2.0 out. (realizing the pain  
it causes to continue to have delays). But do post a patch!

-pete

-- 
(peter.royal|osi)@pobox.com - http://fotap.org/~osi

Reply via email to