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

Migrate to msc 2 api with consumer- and supplier-based service

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • Batch
    • None
    • ---
    • ---

      • replace injector with supplier in all service impl classes
      • remove all getter methods of InjectedValue in all service impl classes
      • add a service consumer to all service impl classes
      • update the constructor to take service consumers and suppliers
      • update service wiring to use ServiceBuilder.provides() and ServiceBuilder.requires() methods

       
      From Richard Opalka's comments: Sure @chengfang , the difference between using org.jboss.msc.Service and org.jboss.msc.service.Service are the following:
      Services implementing new API org.jboss.msc.service will throw UnsupportedOperationException when calling the following deprecated methods on their service controller:

      By implementing deprected org.jboss.msc.service.Service interface aforementioned deprecated methods backward compatibility is maintained.
      I didn't refactor these services because these deprecated methods were used for this services and my main purpose for this PR was fixing just dependencies declaration because ATM I am cleaning up org.jboss.msc.value and org.jboss.msc.injection package usages.
       

      These ServiceController methods were deprecated because they are exposing MSC runtime internals to API users.

            weli@redhat.com Weinan Li
            cfang@redhat.com Cheng Fang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: