In a web application, when you have multiple separate contexts, for example a global context loaded by a Listener and several servlet contexts, what are the rules governing how the parent-child hierarchy is established?

I spent a few hours searching the docs and the web, and was unable to find a definitive answer. There's an answer on StackOverflow (http://stackoverflow.com/questions/7...ontext#7748108) that says Spring sets this up, but gives no details.

Is this documented anywhere?