Seeing data corruption when using ChannelHandlerContext.set/getAttachement API

brunodecarvalho kindernade at gmail.com
Tue Jul 20 20:36:25 EDT 2010


You shouldn't be using @ChannelPipelineCoverage at all, since it has been
deprecated :)

>From the documentation:
"Deprecated. Use the ChannelHandler.Sharable annotation instead."

Here's the doc on @Sharable:
http://docs.jboss.org/netty/3.2/api/org/jboss/netty/channel/ChannelHandler.Sharable.html

As a reminder, @Sharable is purely informative! Nothing keeps you from
creating a @Sharable annotated channel handler for each pipeline/channel.
A good example example is a byte counter channel handler:
- use the same instance in all the channels and you get a global byte
counter;
- use an instance per channel and you get per-channel statistics.


Bruno
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Seeing-data-corruption-when-using-ChannelHandlerContext-set-getAttachement-API-tp5318952p5319140.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list