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

Service providing multiple values

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 1.4.0.Final, 1.4.1.Final
    • None
    • None
    • None

      David Lloyds brain dump:

      • I had a couple thoughts about the MSC API that I've been pondering since the Elytron integration
      • I was deep into the services of the EJB subsystem
      • they are pretty tangled up in there
      • one big reason is, I think, due to a basic limitation of MSC
      • the fact that services have only one value
      • if you want a service to provide more than one value, you have to set up dummy services which depend on the "parent" service, which is a big pain
      • I was thinking that services really have three basic characteristics
      • #1 is - the identity of the service itself; this is important for controlling or removing the actual service
      • #2 is - the things the service requires (dependencies), which are consumed as values
      • #3 is - the things the service provides; presently a service can only provide one thing (but it can provide it under many names using service aliases)
      • it would be nice if we could decouple these things
      • so I could write a single service which provides two different values under two different names, by two different "get" methods for example
      • this is useful for EJB because sometimes you might have one service providing multiple values under different names, and sometimes you might have multiple services providing the same values under single names
      • it's surprisingly difficult to deal with this situation

          There are no Sub-Tasks for this issue.

              ropalka Richard Opalka
              ropalka Richard Opalka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: