Initialises the server connection manager by getting hold of the framework.

@param _acceptListenerFactory

@see com.ibm.ws.sib.jfapchannel.ServerConnectionManager#initialise(com.ibm.ws.sib.jfapchannel.AcceptListenerFactory)
515331
public static void initialise(AcceptListenerFactory _acceptListenerFactory) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "initalise");

        acceptListenerFactory = _acceptListenerFactory;

        // Create the maintainer of the configuration.
        Framework framework = Framework.getInstance();
        if (framework == null) {
            state = State.INITIALISATION_FAILED;
        } else {
            state = State.INITIALISED;

            // Extract the chain reference.
            connectionTracker = new OutboundConnectionTracker(framework);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "initalise");
    }
980758
public void initialise() {
        if (log.isDebugEnabled()) {
            log.debug("now initialising conf");
        }

        initDecodeUsing(decodeUsing);

        boolean rulesOk = true;
        for (int i = 0; i < rules.size(); i++) {
            final Rule rule = (Rule) rules.get(i);
            if (!rule.initialise(context)) {
                // if we failed to initialise anything set the status to bad
                rulesOk = false;
            }
        }
        for (int i = 0; i < outboundRules.size(); i++) {
            final OutboundRule outboundRule = (OutboundRule) outboundRules.get(i);
            if (!outboundRule.initialise(context)) {
                // if we failed to initialise anything set the status to bad
                rulesOk = false;
            }
        }
        for (int i = 0; i < catchElems.size(); i++) {
            final CatchElem catchElem = (CatchElem) catchElems.get(i);
            if (!catchElem.initialise(context)) {
                // if we failed to initialise anything set the status to bad
                rulesOk = false;
            }
        }
        if (rulesOk) {
            ok = true;
        }
        if (log.isDebugEnabled()) {
            log.debug("conf status " + ok);
        }
    }
875039
public void initalised() throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "initalised");
    
    try
    {    
      _lockManager.lockExclusive();

      // Flag that we are in a started state. 
      _started = true;
      
      // If the Neighbour Listener hasn't been created, create it
      if (_proxyListener == null)
        createProxyListener();
     
      // Indicate that reconciling is complete
      _reconciling = false;
      
      _neighbours.resetBusSubscriptionList();
    }      
    finally
    {
      _lockManager.unlockExclusive();
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "initalised"); 
  }
1200058
@Override
    protected void initializeImpl()
    {
        //get connection factory class name
        this.commConnectionFactoryClassName=this.getConfigurationValue(FaxClientSpiConfigurationConstants.CONNECTION_FACTORY_CLASS_NAME_PROPERTY_KEY);
        if(this.commConnectionFactoryClassName==null)
        {
            this.commConnectionFactoryClassName=RXTXCommPortConnectionFactory.class.getName();
        }
        
        //create connection factory
        this.commConnectionFactory=this.createCommPortConnectionFactory();
        if(this.commConnectionFactory==null)
        {
            throw new FaxException("COMM connection factory is not available.");
        }

        //get fax modem class name
        this.faxModemClassName=this.getConfigurationValue(FaxClientSpiConfigurationConstants.FAX_MODEM_CLASS_NAME_PROPERTY_KEY);
        if(this.faxModemClassName==null)
        {
            throw new FaxException("Fax modem class name not defined in fax4j.properties. Property: "+FaxClientSpiConfigurationConstants.FAX_MODEM_CLASS_NAME_PROPERTY_KEY);
        }
        
        //create fax modem adapter
        this.faxModemAdapter=this.createFaxModemAdapter();
        if(this.faxModemAdapter==null)
        {
            throw new FaxException("Fax modem adapter is not available.");
        }
    }
642798
public synchronized void init() {
		for (SocketBinding binding : socketBindings) {
			socketBindingsMap.put(binding.getName(), binding);
		}
		for (SecurityRealm realm : securityRealms) {
			securityRealmsMap.put(realm.getName(), realm);
		}
		for (Interface iface : interfaces) {
			interfacesMap.put(iface.getName(), iface);
		}
		if (subsystem != null) {
			for (UndertowSubsystem.FileHandler handler : subsystem.getFileHandlers()) {
				handlersMap.put(handler.getName(), handler);
			}
			if (subsystem.getFilters() != null) {
				for (UndertowSubsystem.ResponseHeaderFilter filter : subsystem.getFilters().getResponseHeaders()) {
					filtersMap.put(filter.getName(), filter);
				}
				for (UndertowSubsystem.ErrorPageFilter filter : subsystem.getFilters().getErrorPages()) {
					filtersMap.put(filter.getName(), filter);
				}
				for (UndertowSubsystem.CustomFilter filter : subsystem.getFilters().getCustomFilters()) {
					filtersMap.put(filter.getName(), filter);
				}
			}
		}
	}
925786
@Override
	public void init() throws ServletException {
		super.init();
		try {
			config = new Config("/config/serfj.properties");
		} catch (ConfigFileIOException e) {
			LOGGER.error("Can't load framework configuration", e);
			throw new ServletException(e);
		}
		urlInspector = new UrlInspector(config);
	}
1082443
@Override
	public synchronized void initialize(Manager manager) {
		if (this.manager != null) {
			throw new IllegalStateException("Callback was already initialized");
		}
		this.manager = manager;
		for (Callback callback : callbacks) {
			try {
				callback.initialize(manager);
			} catch (Exception e) {
				onManagerWarning("Callback initialization error", e);
			}
		}
	}
1064647
public static synchronized void initialise()
   {
      // Only initialise if it has not already been created
      if (_instance == null)
      {
         // Check what environment we are running in. If we are in server mode we must use the 
         // server diagnostic module.
    	 //Liberty COMMS TODO:
    	 //For now not enabling server side diagnostics as can not load SERVER_DIAG_MODULE_CLASS in a clean manner
    	 // without having dependency of COMMs server ( at least more than 4/5 classes are needed) which defeat
    	 // the purpose of COMMS client independence w.r.to COMMS server
    	 //Has to rework on load SERVER_DIAG_MODULE_CLASS without too many dependencies of COMMS server.
    	
    	 /*
         if (RuntimeInfo.isServer())
         {
            if (tc.isDebugEnabled()) SibTr.debug(tc, "We are in Server mode");
            
            try
            {
               Class clazz = Class.forName(CommsConstants.SERVER_DIAG_MODULE_CLASS);
               Method getInstanceMethod = clazz.getMethod("getInstance", new Class[0]);
               _instance = (CommsDiagnosticModule) getInstanceMethod.invoke(null, (Object[]) null);
            }
            catch (Exception e)
            {
               FFDCFilter.processException(e, CLASS_NAME + ".initialise", 
                                           CommsConstants.COMMSDIAGMODULE_INITIALIZE_01,
                                           CommsConstants.SERVER_DIAG_MODULE_CLASS);
               
               if (tc.isDebugEnabled()) SibTr.debug(tc, "Unable to load the Comms Server Diagnostic Module", e);
               
               // In this case, fall out of here with a null _instance and default to the client
               // one. At least in that case we get _some_ diagnostics...
               // This is the point where I mention that that shouldn't ever happen :-).
            }
         }
         */

         // In all other cases use the client diagnostic module. Note we can instantiate this
         // directly as we are located in the same build component
         if (_instance == null)
         {
            if (tc.isDebugEnabled()) SibTr.debug(tc, "We are NOT in Server mode");
            
            _instance = ClientCommsDiagnosticModule.getInstance();
         }
         
         // Now register the packages
         _instance.register(packageList);
      }
   }
925388
public static void init( ServletContext servletContext )
    {
        PageFlowFactoriesConfig factoriesBean = ConfigUtil.getConfig().getPageFlowFactories();
        FlowControllerFactory factory = null;

        if ( factoriesBean != null )
        {
            PageFlowFactoryConfig fcFactoryBean = factoriesBean.getPageFlowFactory();
            factory = ( FlowControllerFactory ) FactoryUtils.getFactory( servletContext, fcFactoryBean, FlowControllerFactory.class );
        }

        if ( factory == null )
            factory = new FlowControllerFactory();

        factory.reinit( servletContext );

        servletContext.setAttribute( CONTEXT_ATTR, factory );
    }
1077828
public static void startServerComms() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "startServerComms");

        try {
            ServerConnectionManager.initialise(new AcceptListenerFactoryImpl());
        } catch (Throwable t) {
            FFDCFilter.processException(t, CLASS_NAME + ".startServerComms",
                                        CommsConstants.SERVERTRANSPORTFACTORY_INIT_02,
                                        null);

            SibTr.error(tc, "SERVER_FAILED_TO_START_SICO2004", t);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "startServerComms");
    }
780056
protected void initJpa() {
    if (jpaPersistenceUnitName != null) {
      jpaEntityManagerFactory = JpaHelper.createEntityManagerFactory(jpaPersistenceUnitName);
    }
    if (jpaEntityManagerFactory != null) {
      sessionFactories.put(EntityManagerSession.class, new EntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager));
      JPAVariableSerializer jpaType = (JPAVariableSerializer) variableSerializers.getSerializerByName(JPAVariableSerializer.NAME);
      // Add JPA-type
      if (jpaType == null) {
        // We try adding the variable right after byte serializer, if available
        int serializableIndex = variableSerializers.getSerializerIndexByName(ValueType.BYTES.getName());
        if (serializableIndex > -1) {
          variableSerializers.addSerializer(new JPAVariableSerializer(), serializableIndex);
        } else {
          variableSerializers.addSerializer(new JPAVariableSerializer());
        }
      }
    }
  }
1325228
void init() {
        if (dataSource == null) {
            if (connectionType.equals(ConnectionType.POOLED)) {
                HikariConfig config = new HikariConfig();
                config.setMaximumPoolSize(maximumPoolSize);
                config.setDataSourceClassName(dataSourceClass);
                config.addDataSourceProperty("url", url);
                config.addDataSourceProperty("user", user);
                config.addDataSourceProperty("password", password);
                config.setPoolName(CONNECTION_POOL_NAME);
                config.setAutoCommit(autoCommit);
                config.setMaximumPoolSize(maximumPoolSize);
              //  config.setConnectionTestQuery("SELECT 1");
                
                if (connectionTimeout != null) {
                    config.setConnectionTimeout(connectionTimeout);
                }
                if (idleTimeout != null) {
                    config.setIdleTimeout(idleTimeout);
                }
                if (maxLifetime != null) {
                    config.setMaxLifetime(maxLifetime);
                }
                if (minimumIdle != null) {
                    config.setMinimumIdle(minimumIdle);
                }

                ds = new HikariDataSource(config);
                dataSource = ds;

            } else if (connectionType.equals(ConnectionType.JNDI)) {
                if (null == jndiDataSource) {
                    throw new InitializationException("Could not obtain the db connection: jndi data source is null");
                }
                String DATASOURCE_CONTEXT = jndiDataSource;
                try {
                    Context initialContext = new InitialContext();
                    dataSource = (DataSource) initialContext.lookup(DATASOURCE_CONTEXT);
                    if (dataSource == null) {
                        Log.error("Failed to lookup datasource.");
                        throw new InitializationException(
                                "Could not obtain the db connection: Failed to lookup datasource: " + jndiDataSource);
                    }
                } catch (NamingException ex) {
                    throw new InitializationException("Could not obtain the db connection: jndi lookup failed", ex);
                }
            }
        }
    }
1103371
public void init(HttpInboundConnection conn, SessionManager sessMgr) {
        this.connection = conn;
        this.request = conn.getRequest();
        this.sessionData = new SessionInfo(this, sessMgr);
    }
739012
@PostConstruct
    public synchronized void initialize() {
        final FwWebDirection direction = assistWebDirection();
        final SessionResourceProvider provider = direction.assistSessionResourceProvider();
        sessionSharedStorage = prepareSessionSharedStorage(provider);
        httpSessionArranger = prepareHttpSessionArranger(provider);
        showBootLogging();
    }
340095
public void initialize()
	{
		super.initialize();
		services = new HashMap<Class, BCSSServiceProvider>();
		serializable = 0;
		proxy = null;
		bcsListeners = new ArrayList<BeanContextServicesListener>();
	}
1018566
@Override
	public void init(String jsonString) throws IndexerException {
		try {
			config = new JsonSimpleConfig(jsonString);
			init();
		} catch (IOException e) {
			throw new IndexerException(e);
		}
	}
649688
@Override
    protected void init() throws Exception {
        final boolean trace = TraceComponent.isAnyTracingEnabled();

        try {
            PropertyService vProps = new PropertyService();
            NavigableMap<String, Object> wProps = parseConfiguration(properties, vProps);

            // Clone properties so that we can later detect modifications from the current values
            vProps = (PropertyService) vProps.clone();

            String jndiName = (String) wProps.remove(JNDI_NAME);
            String type = (String) wProps.remove(DSConfig.TYPE);

            // Trace some of the most important config settings
            if (trace && tc.isDebugEnabled())
                Tr.debug(this, tc, DATASOURCE, id, jndiName, type);

            // Get the connection manager service for this data source. If none is configured, then use defaults.
            conMgrSvc = (ConnectionManagerService) priv.locateService(componentContext,CONNECTION_MANAGER);

            boolean createdDefaultConnectionManager = false;
            
            if (conMgrSvc == null) {
                if (wProps.containsKey(DSConfig.CONNECTION_MANAGER_REF)) {
                    SQLNonTransientException failure = connectorSvc.ignoreWarnOrFail(tc, null, SQLNonTransientException.class, "MISSING_RESOURCE_J2CA8030",
                                                                                    DSConfig.CONNECTION_MANAGER_REF, "", DATASOURCE, jndiName == null ? id : jndiName);
                    if (failure != null)
                        throw failure;
                }
                conMgrSvc = ConnectionManagerService.createDefaultService(id);
                createdDefaultConnectionManager = true;

            }
            conMgrSvc.addObserver(this);

            // Obtain the data source from the JDBC driver
            // TODO: Switch to org.osgi.service.jdbc.DataSourceFactory for compatibility with OSGI JDBC drivers
            jdbcDriverSvc = (JDBCDriverService) priv.locateService(componentContext,JDBC_DRIVER);

            if (jdbcDriverSvc == null) {
                Tr.error(tc, "DSRA4003.driver.null", jndiName == null ? id : jndiName);

                throw new SQLNonTransientException(ConnectorService.getMessage("MISSING_RESOURCE_J2CA8030", DSConfig.JDBC_DRIVER_REF,
                                                                               "", DATASOURCE, jndiName == null ? id : jndiName));
            }
            jdbcDriverSvc.addObserver(this);

            Object vendorImpl;
            Class<?> ifc;

            if(type == null){
                boolean atLeastJDBC43 = jdbcRuntime.getVersion().compareTo(JDBCRuntimeVersion.VERSION_4_3) >= 0;
                vendorImpl = atLeastJDBC43 || id != null && id.contains("dataSource[DefaultDataSource]")
                                ? jdbcDriverSvc.createAnyPreferXADataSource(vProps, id)
                                : jdbcDriverSvc.createAnyPreferLegacyOrder(vProps, id);
                ifc = vendorImpl instanceof XADataSource ? XADataSource.class
                    : vendorImpl instanceof ConnectionPoolDataSource ? ConnectionPoolDataSource.class
                    : vendorImpl instanceof DataSource ? DataSource.class
                    : Driver.class;
            } else if (ConnectionPoolDataSource.class.getName().equals(type)) {
                ifc = ConnectionPoolDataSource.class;
                vendorImpl = jdbcDriverSvc.createConnectionPoolDataSource(vProps, id);
            } else if (XADataSource.class.getName().equals(type)) {
                ifc = XADataSource.class;
                vendorImpl = jdbcDriverSvc.createXADataSource(vProps, id);
            } else if (DataSource.class.getName().equals(type)) {
                ifc = DataSource.class;
                vendorImpl = jdbcDriverSvc.createDataSource(vProps, id);
            } else if (Driver.class.getName().equals(type)) {
                ifc = Driver.class;
                String url = vProps.getProperty("URL", vProps.getProperty("url"));
                if (url != null && !"".equals(url)) {
                    vendorImpl = jdbcDriverSvc.getDriver(url, vProps, id);
                } else 
                    throw new SQLNonTransientException(AdapterUtil.getNLSMessage("DSRA4014.URL.for.Driver.missing", jndiName == null ? id : jndiName));
            } else
                throw new SQLNonTransientException(ConnectorService.getMessage("MISSING_RESOURCE_J2CA8030", DSConfig.TYPE, type, DATASOURCE, jndiName == null ? id : jndiName));

            // Convert isolationLevel constant name to integer
            vendorImplClassName = vendorImpl.getClass().getName();
            parseIsolationLevel(wProps, vendorImplClassName);
            
            Object objIsolationLevel = wProps.get(DataSourceDef.isolationLevel.name());
            int wIsolationLevel = objIsolationLevel == null ? -1 : (int) objIsolationLevel;
            
            if(wIsolationLevel == Connection.TRANSACTION_NONE) {
                Object objTransactional = wProps.get(DataSourceDef.transactional.name());
                boolean wTransactional = objTransactional == null ? true : (boolean) objTransactional;
                
                if (wTransactional) {
                    throw new SQLException(AdapterUtil.getNLSMessage("DSRA4009.tran.none.transactional.unsupported", id));
                }
            }

            // Derby Embedded needs a reference count so that we can shutdown databases when no longer used.
            isDerbyEmbedded = vendorImplClassName.startsWith("org.apache.derby.jdbc.Embedded");
            if (isDerbyEmbedded) {
                String dbName = (String) vProps.get(DataSourceDef.databaseName.name());
                if (dbName != null) {
                    // Maintaining compatibility here. Variables are no longer normalized by default, but the ResourceFactoryBuilder is still
                    // using VariableRegistry.resolveString() to resolve variables in data source definitions. 
                    dbName = PathUtils.normalize(dbName);
                    embDerbyRefCount.add(dbName);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        Tr.debug(this, tc, "ref count for database shutdown", dbName, embDerbyRefCount);
                }
            }

            isUCP = vendorImplClassName.startsWith("oracle.ucp");
            if (isUCP) {
                if (!createdDefaultConnectionManager && !sentUCPConnMgrPropsIgnoredInfoMessage) {
                    Set<String> connMgrPropsAllowed = Collections.singleton("enableSharingForDirectLookups");
                    Tr.info(tc, "DSRA4013.ignored.connection.manager.config.used", connMgrPropsAllowed);
                    sentUCPConnMgrPropsIgnoredInfoMessage = true;
                }
                updateConfigForUCP(wProps);
            }

            dsConfigRef.set(new DSConfig(id, jndiName, wProps, vProps, connectorSvc));

            WSManagedConnectionFactoryImpl mcfImpl = new WSManagedConnectionFactoryImpl(dsConfigRef, ifc, vendorImpl, jdbcRuntime);

            if (jdbcDriverSvc.loadFromApp()) {
                // data source class loaded from thread context class loader
                mcf = null;
                mcfPerClassLoader = new ConcurrentHashMap<String, WSManagedConnectionFactoryImpl>();
                ClassLoader tccl = priv.getContextClassLoader();
                String identifier = connectorSvc.getClassLoaderIdentifierService().getClassLoaderIdentifier(tccl);
                mcfPerClassLoader.put(identifier, mcfImpl);
            } else {
                // data source class loaded from shared library
                mcf = mcfImpl;
                mcfPerClassLoader = null;
            }

            isInitialized.set(true);
        } catch (Exception x) {
            FFDCFilter.processException(x, getClass().getName(), "587", this);
            // undo any partial initialization
            if (conMgrSvc != null)
                conMgrSvc.deleteObserver(this);
            if (jdbcDriverSvc != null)
                jdbcDriverSvc.deleteObserver(this);
            throw x;
        } catch (Error x) {
            FFDCFilter.processException(x, getClass().getName(), "591", this);
            // undo any partial initialization
            if (conMgrSvc != null)
                conMgrSvc.deleteObserver(this);
            if (jdbcDriverSvc != null)
                jdbcDriverSvc.deleteObserver(this);
            throw x;
        }
    }