Ejemplo n.º 1
0
 public static synchronized void stopModuleFramework() {
   try {
     ModuleFrameworkUtilAdapter.stopFramework();
   } catch (Exception e) {
     new RuntimeException(e);
   }
 }
Ejemplo n.º 2
0
  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;
  }