A threadlocal variable which determines the naming scope of JNDI entries is not being cleared after the deployment of a webapp. This means that when deploying many webapps, subsequent webapps may have their scope set in such a way that jndi entries in their context.xml file are put into java:comp/env instead of the global namespace. Whilst this might be seen as "desirable", it is in fact incorrect and all jndi entries in context.xml files can only be in the global scope. This problem has been addressed in a different way for jetty-7
(see http://jira.codehaus.org/browse/JETTY-708). The jetty-7 fix will be ported to jetty-6, but in the meanwhile, I am checking in a quick fix for the scoping problem. I will update this issue when the jetty-7 solution is ported.