Exemplo n.º 1
0
  public BootstrapHost(String name, Properties props) {
    super(name, props);
    Singletons.replace(BootstrapHostService.class, this);

    try {
      workerManager = new WorkerManager();
      setWorkerManagerAddress(workerManager.getAddress());

      notificationManager = new NotificationManager();
      setNotificationManagerAddress(notificationManager.getAddress());

      statisticsManager = new StatisticsManager();
      setStatisticsManagerAddress(statisticsManager.getAddress());

      broadcastMessageAgent = new BroadcastMessageAgent();
      setBroadcastMessageAgentAddress(broadcastMessageAgent.getAddress());

      WorkerGroupFactory.startup(workerManager);

      initializeCatalogServices();

      if (GroupManager.getCoordinationServices().localMemberIsOldestMember()) doGlobalRecovery();

      registerMBeans();

    } catch (PEException e) {
      throw new RuntimeException("Failed to start DVE server - " + e.rootCause().getMessage(), e);
    } catch (Throwable e) {
      throw new RuntimeException("Failed to start DVE server - " + e.getMessage(), e);
    }
  }