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

AbstractAnnotationMethodEndpointMapping doesn't allow proxies

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.2
    • Component/s: Core
    • Labels:
      None

      Description

      The AbstractAnnotationMethodEndpointMapping looks up annotated method endpoints in the BeanPostProcessor::postProcessBeforeInitialization method. It then holds a reference to the bean inside of a "MethodEndpoint" instance.

      The problem is that proxies get created AFTER the postProcessBeforeInitialization method. The lifecycle goes...

      BeanPostProcessor::postProcessBeforeInitialization
      AbstractAutoProxyCreator::createProxy
      BeanPostProcessor::postProcessAfterInitialization

      The AbstractAnnotationMethodEndpointMapping should implement postProcessAfterInitialization, not postProcessBeforeInitialization

        Activity

        Hide
        raykrueger Ray Krueger added a comment -

        Just to be clear...
        I made this a critical as AOP is used heavily in Spring applications and there is no workaround available for this bug. Whereas bug SWS-220 for example is critical because of the broken contract, but can be worked around by subclassing for a patch. Unfortunately, both postProcessBeforeInitialization and postProcessAfterInitialization are final in the AbstractAnnotationMethodEndpointMapping.

        Show
        raykrueger Ray Krueger added a comment - Just to be clear... I made this a critical as AOP is used heavily in Spring applications and there is no workaround available for this bug. Whereas bug SWS-220 for example is critical because of the broken contract, but can be worked around by subclassing for a patch. Unfortunately, both postProcessBeforeInitialization and postProcessAfterInitialization are final in the AbstractAnnotationMethodEndpointMapping.
        Hide
        raykrueger Ray Krueger added a comment -

        Sorry, I meant to say "I made this a BLOCKER as..."

        Show
        raykrueger Ray Krueger added a comment - Sorry, I meant to say "I made this a BLOCKER as..."
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing 1.0.2 issues.

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing 1.0.2 issues.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: