Shutdown of Server Channel Factory

Michael McGrady mmcgrady at topiatechnology.com
Wed Sep 9 13:30:34 EDT 2009


Thanks, Thomas.  The following is the code I am using and in this test  
there is no other connection than the one.



	public void stop() {
		logger.log(InternalLogLevel.INFO, this.getClass().getSimpleName()
				+ " start stop");
		ChannelFuture close = this.channel.close();
		
		close.addListener(new ChannelFutureListener() {

			public void operationComplete(ChannelFuture future)
					throws Exception {
				NettyKarmaReceiver.this.factory.releaseExternalResources();

				logger.log(InternalLogLevel.INFO, this.getClass().getSimpleName()
						+ " end stop");
			}
			
		});
	}



On Sep 9, 2009, at 10:09 AM, Thomas Bocek wrote:

> Michael McGrady wrote:
>> I am not getting a return from the NeoServerSocketChannelFactory's
>> releaseExternalResources method.  Is this something anyone else has
>> seen?  This is very surprising to me because this is just in  
>> essence a
>> return from the ExecutorUtil terminate method which just copies and
>> shuts down the copies as ExecutorServices shutdown method.  There
>> should be only a 100 millisecond wait in that method.
>
> The awaitTermination() call may return false, so it will wait longer
> than 100msec.
>
>> Any ideas?
>
> Make sure you have closed all connections before calling
> releaseExternalResources. You can use the ChannelGroup to group  
> channels
> and close them with ChannelGroup.close().
>
> Thomas
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users

Mike McGrady
Principal Investigator AF081-028 AFRL SBIR
Senior Engineer
Topia Technology, Inc
1.253.720.3365
mmcgrady at topiatechnology.com







-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20090909/06c58a0d/attachment.html 


More information about the netty-users mailing list