private synchronized void init() {
    // switch into paranoia mode
    if (this.initialized == null) {
      this.beanManager = BeanManagerProvider.getInstance().getBeanManager();
      this.jsfModuleConfig =
          BeanProvider.getContextualReference(this.beanManager, JsfModuleConfig.class, false);

      if (ClassDeactivationUtils.isActivated(JsfRequestBroadcaster.class)) {
        this.jsfRequestBroadcaster =
            BeanProvider.getContextualReference(JsfRequestBroadcaster.class, true);
      }

      ViewConfigResolver viewConfigResolver =
          BeanProvider.getContextualReference(ViewConfigResolver.class);

      // deactivate it, if there is no default-error-view available
      this.defaultErrorViewExceptionHandlerActivated =
          viewConfigResolver.getDefaultErrorViewConfigDescriptor() != null
              && ClassDeactivationUtils.isActivated(
                  DefaultErrorViewAwareExceptionHandlerWrapper.class);

      this.bridgeExceptionHandlerActivated =
          ClassDeactivationUtils.isActivated(BridgeExceptionHandlerWrapper.class);

      this.bridgeExceptionQualifier =
          AnnotationInstanceProvider.of(jsfModuleConfig.getExceptionQualifier());

      this.preDestroyViewMapEventFilterMode =
          ClassDeactivationUtils.isActivated(SecurityAwareViewHandler.class);
      this.isNavigationAwareApplicationWrapperActivated =
          ClassDeactivationUtils.isActivated(NavigationHandlerAwareApplication.class);
      this.initialized = true;
    }
  }
  public DeltaSpikeResourceHandler(ResourceHandler resourceHandler) {
    super();

    wrapped = resourceHandler;
    version = ClassUtils.getJarVersion(this.getClass());
    activated = ClassDeactivationUtils.isActivated(this.getClass());
  }
  DeltaSpikeFacesContextWrapper(FacesContext wrappedFacesContext, ClientWindow clientWindow) {
    this.wrappedFacesContext = wrappedFacesContext;

    if (ClassDeactivationUtils.isActivated(DeltaSpikeExternalContextWrapper.class)) {
      this.wrappedExternalContext =
          new DeltaSpikeExternalContextWrapper(
              wrappedFacesContext.getExternalContext(), clientWindow);
    } else {
      this.wrappedExternalContext = wrappedFacesContext.getExternalContext();
    }

    setCurrentInstance(this);
  }
 @PostConstruct
 protected void init() {
   this.isActive = ClassDeactivationUtils.isActivated(getClass());
 }