I've just checked in the fix:
http://fisheye.jboss.org/changelog/Messaging/trunk?cs=6017
To shut down a ChannelFactory, all Netty channels must be closed, including server sockets
and accepted / connected sockets. I made sure all channels are added to a ChannelGroup so
that they are closed before ChannelFactory is shut down.
To achieve this behavior, I modified MessagingChannelHandler to override channelOpen()
handler method and added a Channel to a ChannelGroup which was specified in the
constructor. Because the previous NettyConnector implementation didn't have a
ChannelGroup field, I added one and called ChannelGroup.close() to clean up all
connections.
On the other hand, there's a convenience method called
'releaseExternalResources()' in ChannelFactory. It shuts down all Executors which
were specified in the ChannelFactory's constructor. I replaced the verbose shutdown /
awaitTermination loop with that. I hope you like it.
After the modification, I confirmed the PingStressTest passes with no freeze. With 100
iterations, it took about 3 minutes to finish in my Intel Core 2 Quad processor.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215703#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...