Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-13616

Support Spring-WS's MessageDispatcherServlet in AbstractDispatcherServletInitializer

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.2.2
    • Fix Version/s: 4.2.3
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      Problem:
      Right now we have to override AbstractDispatcherServletInitializer.registerDispatcherServlet(...) in order to register Spring-WS's MessageDispatcherServlet (tested with Version 2.2.0.RELEASE). AbstractDispatcherServletInitializer.registerDispatcherServlet(...) calls createDispatcherServlet which returns a DispatcherServlet instance whereas MessageDispatcherServlet directly derives from FrameworkServlet. Both DispatcherServlet and MessageDispatcherServlet have the same base class in common that said FrameworkServlet.

      Solution:
      AbstractDispatcherServletInitializer.registerDispatcherServlet(...) should return FrameworkServlet in order to support both Spring MVC's DispatcherServlet and Spring-WS's MessageDispatcherServlet.

      A pull request with a fix will be provided via Github.

        Activity

        Hide
        juergen.hoeller Juergen Hoeller added a comment -

        Good point - relaxing createDispatcherServlet's declared return type should even be binary-compatible for overriding due to the way covariant return types work. I'll apply this right away with some fine-tuning of the corresponding javadoc.

        Juergen

        Show
        juergen.hoeller Juergen Hoeller added a comment - Good point - relaxing createDispatcherServlet 's declared return type should even be binary-compatible for overriding due to the way covariant return types work. I'll apply this right away with some fine-tuning of the corresponding javadoc. Juergen

          People

          • Assignee:
            juergen.hoeller Juergen Hoeller
            Reporter:
            ksokol Kamill Sokol
            Last updater:
            St├ęphane Nicoll
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 17 weeks, 3 days ago