Netty usage in AS5 (shutdown hangs)

Bob McWhirter bmcwhirt at redhat.com
Tue Sep 1 17:58:45 EDT 2009


Howdy Dai and all--

I'm attempting to use Netty from JBoss AS5, and I'm using Netty's own  
jboss-beans.xml from netty.jar, primarily for the  
ServerSocketChannelFactory MCBean.

I ultimately jam that into my own POJO (which may be one of many)  
which sets up the bootstrap/pipeline, and uses the channel-factory.

In my own POJO server's stop(), I have

     ChannelFuture closeFuture = this.channel.close();
     closeFuture.await( 5, TimeUnit.SECONDS );
     this.channelFactory.releaseExternalResources();

It seems that with this block (or even without), shutdown of the AS  
hangs indefinitely.  Is there more shutdown/cleanup required in order  
to get all lingering threads terminated?

Also, is the ChannelFactory.releaseExternalResources() safe to call if  
other POJOs are still using the same shared channel factory?  Will  
that abruptly destroy things?

Has anyone else implemented a Netty server as a POJO in Microcontainer?

Thanks,

	-Bob




More information about the netty-users mailing list