Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-1885

ServiceActivator blocks server startup if more than 8 services - platformspecific

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Minor Minor
    • 8.0.0.Beta1
    • 8.0.0.Alpha3
    • Clustering, Server
    • None

      We try to start more than 8 services by ServiceActivator.
      We follow hasingleton quickstart.

      Server startup is blocked on Linux but not on windows (?!?).
      If we introduce a delay of e.g. 1 second, all services start correctly also on Linux:

      public void activate(ServiceActivatorContext context) {
      ESMSSingletonServiceBase<T> service = getSingletonService();
      log.info("ESMSService will be installed: " + service.getSingletonServiceName());

      SingletonService<String> singleton = new SingletonService<String>(service.getSingletonServiceName(), service);

      singleton.build(new DelegatingServiceContainer(context.getServiceTarget(), context.getServiceRegistry()))
      .addDependency(ServerEnvironmentService.SERVICE_NAME, ServerEnvironment.class, service.env)
      .setInitialMode(ServiceController.Mode.ACTIVE).install();

      // TODO: diesen Workaround evtl mal beheben.
      // (Server startet im Moment nicht anders... zumindest nicht auf Linux! Timingproblem?)
      try

      { Thread.sleep(1000); }

      catch (InterruptedException e) {}

      Thread dump of Linux blocked server attached

            pferraro@redhat.com Paul Ferraro
            fruehbeck@aon.at Thomas Frühbeck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: