Uploaded image for project: 'Modular Service Container'
  1. Modular Service Container
  2. MSC-349

Using provides() can result in serviceId == null and aliases == null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 1.5.6.Final
    • runtime
    • None

      When installing a service using provides():

      ServiceName name = ServiceName.parse("my.service.name");
      ServiceName alias = ServiceName.parse("my.service.alias");
      
      ServiceBuilder builder = ServiceTarget.addService();
      builder.provides(name, alias);
      builder.setInstance(new UnaryService(....));
      

      this results in a ServiceBuilder with the following attributes:

      serviceId = null
      Set<ServiceName> provides = {name, alias}
      Set<ServiceName> aliases = {}
      

      When using the management console to dump services, the listing looks like this:

      /core-service=service-container:dump-services()
      Service \"null\" (class org.wildfly.service.Installer$UnaryService) (aliases: []) mode PASSIVE state UP (parent: jboss.as.server-controller)
      sivation)
      

      In the documentation for the MSC, I remember reading that if you configure service names using provides only, the first service name will become the serviceId and any subsequent service names will become aliases, but this does not seem to be happening.

              ropalka Richard Opalka
              rachmato@redhat.com Richard Achmatowicz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: