It's better than never. :)
On Fri, 16 May 2008 05:44:23 +0900, Pauls, Karl <[EMAIL PROTECTED]> wrote:
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
--
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/