Initialises JMX stuff.
@param doRegister if true, perform registration, if false unregister
519727
protected void registerUnregisterJMX(boolean doRegister) {
		if (this.mbs == null ){ // this way makes it easier for mocking.
			this.mbs = ManagementFactory.getPlatformMBeanServer();
		}
		try {
			String suffix = "";

			if (this.config.getPoolName()!=null){
				suffix="-"+this.config.getPoolName();
			}

			ObjectName name = new ObjectName(MBEAN_BONECP +suffix);
			ObjectName configname = new ObjectName(MBEAN_CONFIG + suffix);


			if (doRegister){
				if (!this.mbs.isRegistered(name)){
					this.mbs.registerMBean(this.statistics, name);
				}
				if (!this.mbs.isRegistered(configname)){
					this.mbs.registerMBean(this.config, configname);
				}
			} else {
				if (this.mbs.isRegistered(name)){
					this.mbs.unregisterMBean(name);
				}
				if (this.mbs.isRegistered(configname)){
					this.mbs.unregisterMBean(configname);
				}
			}
		} catch (Exception e) {
			logger.error("Unable to start/stop JMX", e);
		}
	}
274405
public void register(BundleContext bndCtx) {
        final String methodName = "register()";
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(tc, methodName, this);
        Hashtable<String, String> props = new Hashtable<String, String>();
        props.put("jmx.objectname", this.obn.toString());

        if (IS_DEBUGGING)
            // Extra Check: Does this MBean exist already?
            MBeanHelper.isMbeanExist(objectName.toString() + "*", className, methodName);

        // Register the MBean
        if (trace && tc.isDebugEnabled())
            Tr.debug(tc, "activateMBean started for " + this.obn.toString());
        this.reg = bndCtx.registerService(JCAConnectionFactoryMBeanImpl.class.getName(), this, props);
        if (trace && tc.isEntryEnabled())
            Tr.exit(tc, methodName, this);
    }
190901
public void init() {
        this.session.getAgenda().getAgendaGroup( "register neighbor" ).setFocus();
        this.session.fireAllRules();
        this.session.getAgenda().getAgendaGroup( "calculate" ).clear();
    }
742029
public static void register(final MBeanServer mbs, final Object obj)
        {
        final ObjectName mBeanName = JmxUtils.getObjectName(obj.getClass());
        try
            {
            mbs.registerMBean(obj, mBeanName);
            }
        catch (final InstanceAlreadyExistsException e)
            {
            LOG.error("Could not start JMX", e);
            }
        catch (final MBeanRegistrationException e)
            {
            LOG.error("Could not register", e);
            }
        catch (final NotCompliantMBeanException e)
            {
            LOG.error("MBean error", e);
            }
        }
190496
protected function initRegistries()
    {
        $this->roleRegistry = new Registry();
        $this->resourceRegistry = new Registry();
        $this->permissionRegistry = new Registry();
        $this->globalRegistry = new GlobalRegistry();
    }
478289
protected void setRegisters(int[] registers) {
        this.registers = Arrays.copyOf(registers, registers.length);
        this.length = registers.length;
    }
771328
public void initialize(ClassLoader classLoader)
    {
        ComponentAnnotationLoader loader = new ComponentAnnotationLoader();
        loader.initialize(this, classLoader);

        // Extension point to allow component to manipulate ComponentManager initialized state.
        try {
            List<ComponentManagerInitializer> initializers = this.getInstanceList(ComponentManagerInitializer.class);
            for (ComponentManagerInitializer initializer : initializers) {
                initializer.initialize(this);
            }
        } catch (ComponentLookupException e) {
            // Should never happen
            this.logger.error("Failed to lookup ComponentManagerInitializer components", e);
        }
    }
73351
private final void init(boolean useClassLoader) {
		final CYaHPConverter converter = this;
		System.out.println("Initializing...");
		long time = System.currentTimeMillis();
		
		if (!useClassLoader) {
			System.out.println("init time: "+(System.currentTimeMillis()-time));
			return;
		}

		// if classloader is init return.
		if (CClassLoader.getRootLoader().isInit()) {
			return;
		} // end if
		// ensure the temporary files are delete on exit.
		Runtime.getRuntime().addShutdownHook(new Thread() {
				public void run() {
					try {
						converter.finalize();
					} // end try
					catch (final Throwable e) {}
				} // end run()
			} // end new
		);

		ClassLoader loader = this.getClass().getClassLoader();
		CClassLoaderConfig config = new CClassLoaderConfig();
		config.addLoaderInfo("/main",
			new CClassLoaderConfig.CLoaderInfo(true, true, false, false));
		config.addFile("/main", loader.getResource("itext-yahp.jar"));
		config.addFile("/main", loader.getResource("tidy-yahp.jar"));
		config.addFile("/main", loader.getResource("log4j-yahp.jar"));
		config.addFile("/main", loader.getResource("shanijar-yahp.jar"));
		config.addFile("/main", loader.getResource("xmlapi-yahp.jar"));
		config.addFile("/main", loader.getResource("yahp-internal.jar"));
		config.addFile("/main", loader.getResource("commonio-yahp.jar"));
		config.addFile("/main", loader.getResource("commonlog-yahp.jar"));
		config.addFile("/main", loader.getResource("core-renderer-yahp.jar"));
		config.addFile("/main", loader.getResource("jaxen-yahp.jar"));
		CClassLoader.init(config);
		try {
			URL url = CClassLoader.getRootLoader().getResource("log4j.properties");
			if (url != null) {
				ClassLoader cx = Thread.currentThread().getContextClassLoader();
				try {
					Thread.currentThread().setContextClassLoader(CClassLoader.getRootLoader());
					Class pc = CClassLoader.getRootLoader().loadClass("org.apache.log4j.PropertyConfigurator");
					Method configure = pc.getDeclaredMethod("configure", new Class[]{URL.class});
					configure.invoke(null, new Object[]{url});
				}
				finally {
					Thread.currentThread().setContextClassLoader(cx);
				}
			}
		}
		catch(Exception ignore){}
		System.out.println("init time: "+(System.currentTimeMillis()-time));
	}
1069920
protected function initialize()
    {
        if (is_null($this->synchronizerToken)) {
            $this->synchronizerToken = new SynchronizerTokenNativeSession();
        }
        if (is_null($this->validator)) {
            $this->validator = new Validator($this->configuration, $this->getTranslator());
        }
    }
537412
private void initJmxExpose() {
		final String packageName = getClass().getName().substring(0,
				getClass().getName().length() - getClass().getSimpleName().length() - 1);
		String webapp = Parameters.getContextPath(Parameters.getServletContext());
		if (webapp.length() >= 1 && webapp.charAt(0) == '/') {
			webapp = webapp.substring(1, webapp.length());
		}
		final List<Counter> counters = collector.getCounters();
		final MBeanServer platformMBeanServer = MBeans.getPlatformMBeanServer();
		try {
			for (final Counter counter : counters) {
				if (!Parameters.isCounterHidden(counter.getName())) {
					final CounterRequestMXBean.CounterRequestMXBeanImpl mxBean = new CounterRequestMXBean.CounterRequestMXBeanImpl(
							counter);
					final ObjectName name = new ObjectName(
							packageName + ":type=CounterRequest,context=" + webapp + ",name="
									+ counter.getName());
					platformMBeanServer.registerMBean(mxBean, name);
					jmxNames.add(name);
				}
			}
			LOG.debug("JMX mbeans registered");
		} catch (final JMException e) {
			LOG.warn("failed to register JMX mbeans", e);
		}
	}
546206
@SuppressWarnings ("deprecation")
  public static void initStandard (@Nonnull final ValidationExecutorSetRegistry aRegistry)
  {
    // For better error messages
    LocationBeautifierSPI.addMappings (UBL21NamespaceContext.getInstance ());

    PeppolValidation350.init (aRegistry);
    PeppolValidation360.init (aRegistry);
    PeppolValidation370.init (aRegistry);
  }
191245
private void initialize() {
        if(this.initialized) {
            return;
        }
        if (LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.INFO)) {
            if (this.sessionStoreService==null) {
                LoggingUtil.SESSION_LOGGER_CORE.logp(Level.INFO, methodClassName, "initialize", "SessionMgrComponentImpl.noPersistence");
            } else {
                String modeName = "sessionPersistenceMode";
                Object modeValue = this.mergedConfiguration.get(modeName);
                LoggingUtil.SESSION_LOGGER_CORE.logp(Level.INFO, methodClassName, "initialize", "SessionMgrComponentImpl.persistenceMode", new Object[] { modeValue });
            }
        }
        SessionProperties.setPropertiesInSMC(this.serverLevelSessionManagerConfig, this.mergedConfiguration);
        String cloneId = SessionManagerConfig.getCloneId();
        if (cloneId == null) {
            if (this.sessionStoreService==null && SessionManagerConfig.isTurnOffCloneId()) {
                /*-
                 * In tWAS, WsSessionAffinityManager sets the CloneID to -1 when two conditions are both met:
                 * A) Running in a standalone server (com.ibm.ws.runtime.service.WLM#getMemberUID()==null)
                 * B) The HttpSessionCloneId custom property is not explicitly set
                 * 
                 * In addition, tWAS will set the CloneID to "" (the empty String) if a third condition is also met:
                 * C) The NoAdditionalSessionInfo custom property is set to "true"
                 * 
                 * In lWAS, there's no notion of a "standalone" server, because potentially any lWAS server 
                 * could require a CloneID for session affinity. As a result, our logic for using an
                 * empty Clone ID on lWAS needs to be different than our logic on tWAS.
                 * 
                 * Since most customers who specify a session store will be interested in session affinity,
                 * we'll assume that these customers are always interested in a non-empty Clone ID.
                 * 
                 * We'll also assume that customers who do not specify a session store who also explicitly
                 * set the noAdditionalInfo property to "true" would prefer an empty Clone ID.
                 * 
                 * All customers can always explicitly set the cloneId property to override these assumptions.
                 */
                cloneId = "";
            } else {
                String serverId = getServerId(); // never returns null
                if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                    LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, "initialize", "serverId=" + serverId);
                }
                SessionManagerConfig.setServerId(serverId);
                cloneId = EncodeCloneID.encodeString(serverId); // never returns null
            }
            SessionManagerConfig.setCloneId(cloneId);
        }
        this.initialized=true;
    }
1270485
public static void initialize(Retransformer trans) {
        // NOTE: Using stdout/err as jul had a side effect initializing jboss logging
        if (log.isLoggable(Level.FINER)) {
            log.finer("Initializing Client Manager");
        }

        transformer = trans;

        // Obtain collector
        collector = ServiceResolver.getSingletonService(TraceCollector.class);

        if (log.isLoggable(Level.FINER)) {
            log.finer("Trace Collector: " + collector);
        }

        // Obtain the configuration service
        configService = ServiceResolver.getSingletonService(ConfigurationService.class);

        if (log.isLoggable(Level.FINER)) {
            log.finer("Configuration Service: " + configService);
        }

        if (configService != null) {
            if (!processConfig()) {
                configExecutor.schedule(new Runnable() {
                    @Override
                    public void run() {
                        if (processConfig()) {
                            // Shutdown the executor
                            configExecutor.shutdownNow();
                        }
                    }
                }, configRetryInterval, TimeUnit.SECONDS);
            }
        } else {
            log.info("APM has not been configured");
        }
    }
932060
protected function initServices()
    {
        $dependencies = $this->config->get('dependencies', null);
        $this->getDI()->setShared('registrant', new Registrant($dependencies));
        $this->getDI()->setShared('config', $this->config);
        $this->getDI()->get('registrant')->registration();
    }
944395
@PostConstruct
	public void initialize() {
		try {
			Class.forName("org.hl7.fhir.instance.model.QuestionnaireResponse");
			myValidateResponses = true;
		} catch (ClassNotFoundException e) {
			myValidateResponses = Boolean.FALSE;
		}
	}
404093
public void init ()
    {
        if (_initers == null) {
            log.warning("Refusing repeat init() request.");
            return;
        }

        ObserverList<InitComponent> list = _initers.toObserverList();
        _initers = null;
        list.apply(new ObserverList.ObserverOp<InitComponent>() {
            public boolean apply (InitComponent comp) {
                log.debug("Initializing component", "comp", comp);
                comp.init();
                return true;
            }
        });
    }
581179
public void setRegistrationConfig(RegistrationConfig registrationConfig) {
        this.registrationConfig = registrationConfig;

        if (registrationConfig.getDefaultConfig()!=null) {
            for (String key : registrationConfig.getDefaultConfig().keySet()) {
                dynamicConfig.put(key, registrationConfig.getDefaultConfig().get(key));
            }
        }
    }