docs: public static void injectContextProxiesAndApplication(AbstractResourceInfo cri,
                                                            Object instance,
                                                            Application app,
                                                            ProviderFactory factory) {
  
          /** inject proxy for singleton only */
          if (!cri.isSingleton())
              return;
  
          /** application inject has been done earlier. @see LibertyJaxRsServerFactoryBean.injectContextApplication() */
          if (cri instanceof ApplicationInfo)
              return;
  
          JaxRsFactoryBeanCustomizer beanCustomizer = InjectionRuntimeContextHelper.findBeanCustomizer(instance.getClass(), cri.getBus());
          Boolean isManagedBean = beanCustomizer == null ? false : true;
  
          InjectionRuntimeContext irc = InjectionRuntimeContextHelper.getRuntimeContext();
          synchronized (instance) {
              for (Map.Entry<Class<?>, Method> entry : cri.getContextMethods().entrySet()) {
                  Method method = entry.getValue();
                  Object value = null;
                  Class<?> cls = method.getParameterTypes()[0];
                  if (cls == Application.class) {
                    value = app;
                  } else if (VALUE_CONTEXTS.contains(cls.getName()) && factory != null) {
                      ContextProvider<?> p = factory.createContextProvider(cls, null);
                      if (p != null) {
                          value = p.createContext(null);
                      }
                  } else {
                      value = cri.getContextSetterProxy(method);
                  }
  
                  if (isManagedBean)
                      irc.setRuntimeCtxObject(entry.getKey().getName(), value);
                  else
                      InjectionUtils.injectThroughMethod(instance, method, value);
              }
  
              for (Field f : cri.getContextFields()) {
                  Object value = null;
                  Class<?> cls = f.getType();
                  if (cls == Application.class) {
                      value = app;
                  } else if (VALUE_CONTEXTS.contains(cls.getName()) && factory != null) {
                      ContextProvider<?> p = factory.createContextProvider(cls, null);
                      if (p != null) {
                          value = p.createContext(null);
                      }
                  } else {
                      value = cri.getContextFieldProxy(f);
                  }
  
                  if (isManagedBean)
                      irc.setRuntimeCtxObject(f.getType().getName(), value);
                  else
                      InjectionUtils.injectFieldValue(f, instance, value);
              }
          }
  
          Object o = null;
          //replace singleton resource after context injection is done.
          if (isManagedBean && (cri instanceof ClassResourceInfo)) {
              o = beanCustomizer.onSingletonServiceInit(instance,
                                                        InjectionRuntimeContextHelper.getBeanCustomizerContext(beanCustomizer, cri.getBus()));
  
              SingletonResourceProvider sp = new SingletonResourceProvider(o);
              ((ClassResourceInfo) cri).setResourceProvider(sp);
              instance = o;
          }
  
          if (!isManagedBean && (cri instanceof ClassResourceInfo))
          {
              //call postConstruct method for singleton resource which are non-CDI/EJB
              Method postConstructMethod = ResourceUtils.findPostConstructMethod(instance.getClass());
              InjectionUtils.invokeLifeCycleMethod(instance, postConstructMethod);
          }
  
      }