Javaee platform spec describes some new jndi java: contexts that are more shared between components.
My first idea for implementing this:
1. in RootContext, have the thread local represent java: rather than java:comp. So all the namespaces will be in the Context object.
2. Construct this Context by federating objects for each scope. We'll have to maintain a global context somewhere. The others can presumably be constructed during deployment and set up in the existing gbeans for the app components.
3. Modify the naming builders to put stuff into the right namespace.