Servlets Mapping isn't working #20

Closed
ctoestreich opened this Issue Oct 26, 2012 · 1 comment

Projects

None yet

1 participant

@ctoestreich
Collaborator

All items configured under the node

/**
     * cxf.servlets
     * <p>
     * A map of Servlet Name -> Servlet Mapping Pattern. If multiple Cxf
     * servlets are required or a different mapping pattern is needed this
     * configuration allows that.
     */
    servlets = [
            CxfServlet: '/services/*'
    ]

are sharing the same servlet and services. Multiple defined endpoints all look the same and have same services due to the code

def doWithWebDescriptor = { xml ->
        WebDescriptorConfiguration wdc = new WebDescriptorConfiguration(xml)
        with wdc.configuredServlets()
    }

 lastServletDescriptor() + {
                    servlet {
                        'servlet-name'(name)
                        'servlet-class'('org.grails.cxf.servlet.GrailsCxfServlet')
                        'load-on-startup'(loadOnStartup)
                    }
                }

                lastServletMappingDescriptor() + {
                    'servlet-mapping' {
                        'servlet-name'(name)
                        'url-pattern'(pattern)
                    }
                }

The GrailsCxfServlet appears to be a singleton.

@ctoestreich ctoestreich was assigned Oct 26, 2012
@ctoestreich
Collaborator

Based on some further research it appears that the servlets are sharing the application context and wiring all beans from all contexts. see http://cxf.547215.n5.nabble.com/separate-CXFServlet-for-private-API-s-td3261355.html for more discussion on this topic. Going to try a few of these things ?dsl? to get this working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment