Hey Tomo - these are good ideas. One thing I should have mentioned the other day is that we should shoot for the most straightforward solution for 0.5.0.Final and the most elegant solution for 0.6.0. :-) My concern with a major change here is that we are going to break the test stuff between Beta and Final. One possible solution in the short term is to simply use static fields in NamingMixIn along with a flag which indicates whether it's been initialized or not. Set/check this in a thread-safe way and use it to guard against repeated initializations and unitializations. This has a side effect of sharing the naming context across tests, so it's not ideal. The only other 'easy' option is to simply back out the change that introduced the inheritance - which may be the way to go.
@Lukasz - I'll be out tomorrow, but if you can chime in with your thoughts, that would be great.
got you - here is the long term fix like I mentioned above
and I will push the short term fix onto my JCA outbound pull requests.