Tapestry
  1. Tapestry
  2. TAPESTRY-1443

org.apache.tapestry.annotations.Service annotation is ignored

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.4
    • Fix Version/s: 5.0.5
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      org.apache.tapestry.annotations.Service annotation does not work - it does not help to match service by id (for example, to resolve ambiguity). I think, additional ObjectProvider is required (that is executed before "Alias" object provider) with provide method like the following:

      public <T> T provide(Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator) {
      Service service = annotationProvider.getAnnotation(Service.class);
      if (service == null) return null;
      String expanded = _symbolSource.expandSymbols(service.value());
      return locator.getService(expanded, objectType);
      }

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        Yep, the annotation is there, but no logic to do anything with it.

        Show
        Howard M. Lewis Ship added a comment - Yep, the annotation is there, but no logic to do anything with it.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Ivan Dubrov
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development