Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-262

Endpoint annotation should be annotated as @Inherited

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.5 M2
    • Component/s: Core
    • Labels:
      None

      Description

      After fixing SWS-222 the AbstractAnnotationMethodEndpointMapping will no longer see the @Endpoint annotation on a class that has been proxied using an interface.

      For example, if my endpoint is annotated and thus proxied, using the Acegi @Secured annotation, "MyEndpoint" below will never be discovered.

      interface MyEndpointIF {
      }
      
      //this class will never be discovered
      @Endpoint
      @Secured
      class MyEndpoint implements MyEndpointIF {
      }
      

      Given that the @Endpoint annotation is ONLY used for discovery, and not proxying purposes the @Endpoint annotation can be annotated as @Inherited and can then be placed on the interface.

      @Inherited
      @interface Endpoint {
      }
      
      //now the AbstractAnnotationMethodEndpointMapping will see a properly annotated bean and be happy.
      @Endpoint
      interface MyEndpointIF {
      }
      
      @Secured
      class MyEndpoint implements MyEndpointIF {
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              raykrueger Ray Krueger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: