* @throws InjectionException if we're unable to obtain the
* <code>JndiNameEnvironment</code>
*/
private JndiNameEnvironment getNamingEnvironment()
throws InjectionException {
ComponentInvocation inv = invokeMgr.getCurrentInvocation();
if (inv != null) {
JndiNameEnvironment componentEnv = (JndiNameEnvironment)
theSwitch.getDescriptorFor(inv.getContainerContext());
if (componentEnv != null) {
return componentEnv;
} else {
throw new InjectionException("No descriptor registered for " + " current invocation : " + inv);