Sorry for being a little late on this, but for behavior-changing attributes one 
technique which I have practiced is to make all fields final and when changes 
are needed I swap out the implementation since my enclosing system is 
thread-safe.

For example, the filter and protocol chains are thread-safe and allow adding 
and removing (and replacing?) filters & protocols in a thread-safe manner.

This is a very heavyweight technique for variables which change frequently, but 
in my systems it performs quite well and provides explicit transactional 
behavior when a change is needed.

I don't mind feedback on this idea and I will certainly understand if you find 
this approach is not applicable to MINA. ;)

-karl

Reply via email to