We discussed this a while back.
The idea of context is an application level issue. e.g. a web context is different
from an ejb context and more different from request, page, session or
even JVM or cluster context.
Gavin and I decided that such relationships are better built on top of the MC
rather than inside the MC, because only the user/application really knows what the
AOP does have a model for such contexts, but this is to load/query "metadata" and apply
aspects, but these are not linked to application level contexts like page/session.
AFAIK, nobody has started this work, despite lots of people asking this question.
i agree. such a framework is better build on top of the MC.
in my opinion, the most important part is having typed thread local context. meaning that all information related to the current contexts (web-request, web-session, transaction, hibernate session, security context, ...) is available via a thread local lookup. and typed so that a user can use code completion.
e.g. Contexts.getSecurityContext().getUserPrincipal() or Contexts.getPersistenceContext().getPersistenceManager()
all this information is now (in current enterprise development) scattered all over the different specs.
i would happy to work out a prototype to show all features that i want in there. but finding time for that will be difficult. to take on the development of the real stuff, i lack time, i think. we'll see how it goes.