private void initIfNecessary() {
		if (logger.isLoggable(Level.FINER)) {
			logger.config("In initIfNecessary().");
		}
		// Use double-checked locking with volatile.
		if (!isInited) {
			synchronized (isInitedLock) {
				if (!isInited) {
					logger.config("--- Initializing ServicesManagerImpl ---");
					batchConfigImpl = new BatchConfigImpl();

					// Read config
					readConfigFromPropertiesFiles();
					readConfigFromSPI();
					readConfigFromSystemProperties();

					// Set config in memory
					initBatchConfigImpl();
					initServiceImplOverrides();
					initDatabaseConfig();
					initPlatformSEorEE();

					isInited = Boolean.TRUE;
					
					logger.config("--- Completed initialization of ServicesManagerImpl ---");
				}
			}
		}

		logger.config("Exiting initIfNecessary()");
	}
private void initIfNecessary ( ) { if ( logger . isLoggable ( Level . FINER ) ) { logger . config ( "In initIfNecessary()." ) ; } if ( ! isInited ) { synchronized ( isInitedLock ) { if ( ! isInited ) { logger . config ( "--- Initializing ServicesManagerImpl ---" ) ; batchConfigImpl = new BatchConfigImpl ( ) ; readConfigFromPropertiesFiles ( ) ; readConfigFromSPI ( ) ; readConfigFromSystemProperties ( ) ; initBatchConfigImpl ( ) ; initServiceImplOverrides ( ) ; initDatabaseConfig ( ) ; initPlatformSEorEE ( ) ; isInited = Boolean . TRUE ; logger . config ( "--- Completed initialization of ServicesManagerImpl ---" ) ; } } } logger . config ( "Exiting initIfNecessary()" ) ; }
Init doesn't actually load the service impls, which are still loaded lazily.   What it does is it
hardens the config.  This is necessary since the batch runtime by and large is not dynamically
configurable, (e.g. via MBeans).  Things like the database config used by the batch runtime's
persistent store are hardened then, as are the names of the service impls to use.