Exemplo n.º 1
0
  private static void _reloadServletContext(
      HttpServletRequest request, UnicodeProperties unicodeProperties) throws Exception {

    // Data sources

    Properties jdbcProperties = new Properties();

    jdbcProperties.putAll(unicodeProperties);

    jdbcProperties = PropertiesUtil.getProperties(jdbcProperties, "jdbc.default.", true);

    DataSourceSwapper.swapCounterDataSource(jdbcProperties);
    DataSourceSwapper.swapLiferayDataSource(jdbcProperties);

    // Caches

    CacheRegistryUtil.clear();
    MultiVMPoolUtil.clear();
    WebCachePoolUtil.clear();
    CentralizedThreadLocal.clearShortLivedThreadLocals();

    // Persistence beans

    _reconfigurePersistenceBeans();

    // Quartz

    QuartzLocalServiceUtil.checkQuartzTables();

    // Startup

    StartupAction startupAction = new StartupAction();

    startupAction.run(null);

    // Servlet context

    HttpSession session = request.getSession();

    PortalInstances.reload(session.getServletContext());
  }
Exemplo n.º 2
0
  protected void processStartupEvents() throws Exception {
    StartupAction startupAction = new StartupAction();

    startupAction.run(null);
  }