envBinding.put("link", link);
RootContext.setComponentContext(readOnlyContext);
Context javaCompContext = new JavaCompContextGBean();
Context globalContext = new ImmutableContext(Collections.singletonMap(javaCompContext.getNameInNamespace(), javaCompContext));
GlobalContextManager.setGlobalContext(globalContext);
initialContext = new InitialContext();
compContext = (Context) initialContext.lookup("java:comp");
envContext = (Context) initialContext.lookup("java:comp/env");