Extension context - how does it work?

I’m implementing some new extensions and cleaning up some old ones, and am having trouble understanding how the context is used in the system.

We’ve defined some of our extensions in the Java/user context (to distinguish them from the extensions provided by Percussion), but I got some errors when I attempted to define a JEXL extension in that context. It seems to work when I put it into the global/percussion/user context, but not in the Java/user context.

Can anyone shed light on how the context is used by the system, and what schemes you have used to organize your extensions and contexts?