public static synchronized void initWithSpring(boolean force, List<String> extraConfigLocations) { if (force) { _initialized = false; } if (_initialized) { return; } if (!_neverInitialized) { PropsUtil.reload(); } else { _neverInitialized = false; } init(); SpringUtil.loadContext(extraConfigLocations); _initialized = true; }
public static synchronized void initWithSpringAndModuleFramework( boolean force, List<String> extraConfigLocations) { if (force) { _initialized = false; } if (_initialized) { return; } if (!_neverInitialized) { PropsUtil.reload(); } else { _neverInitialized = false; } try { PropsValues.LIFERAY_WEB_PORTAL_CONTEXT_TEMPDIR = System.getProperty(SystemProperties.TMP_DIR); init(); ModuleFrameworkUtilAdapter.startFramework(); SpringUtil.loadContext(extraConfigLocations); BeanLocatorImpl beanLocatorImpl = (BeanLocatorImpl) PortalBeanLocatorUtil.getBeanLocator(); ModuleFrameworkUtilAdapter.registerContext(beanLocatorImpl.getApplicationContext()); ModuleFrameworkUtilAdapter.startRuntime(); } catch (Exception e) { throw new RuntimeException(e); } _initialized = true; }