On May 24, 2007, at 8:12 AM, Niklas Therning wrote:

Ben Gollmer wrote:

Of course, it probably isn't the best application design to go around
blasting IoSession attributes willy-nilly. However, I know my code,
and nothing else was storing attributes on IoSessions until I started
working with JMX. It would be nice to have a mention of this on the
Mina+JMX wiki page for future reference.


There are other stuff in MINA apart from the JMX code which use
IoSession attributes to store state (e.g. StreamWriteFilter, SSLFilter). It's not a good idea to clear all attributes. Instead, why don't you put
a dedicated Map in the session and store your state in it? Then you
could just change your code to iterate over the keys of that map and
remove whatever keys you like.

True, but I'm not using any filters except my own. I am planning on moving my attributes to a custom 'namespace', as you suggested.

I guess I was just caught off guard by the StatCollector using an attribute. Do the docs for StreamWriteFilter and SSLFilter mention their use of attributes?

--
Ben


Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to