[
https://issues.apache.org/jira/browse/DOSGI-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13554894#comment-13554894
]
Christian Schneider commented on DOSGI-140:
-------------------------------------------
I also think a context should be shareable. The problem is that we currently
create the CXFServlet with a SecurityDelegatingHttpContext that is configured
by properties of the bundle the service resides in. So if we cache the servlet
and context then the context will be configured with the properties of the
bundle of the first service that registers with this context.
I propose to change the way we create contexts. Instead of creating the context
on the fly I propose we let the user register the context as an OSGi service
with a property "name".
So when we register a service with a context we do not create the context and
servlet ourself but instead look up the named OSGi service. So the user has
more freedom to customize the context and we have a clean way to determine a
context even for more than one dosgi service.
> Support the registration of multiple bundles sharing the same HTTP context
> --------------------------------------------------------------------------
>
> Key: DOSGI-140
> URL: https://issues.apache.org/jira/browse/DOSGI-140
> Project: CXF Distributed OSGi
> Issue Type: Improvement
> Components: DSW
> Reporter: Sergey Beryozkin
> Fix For: 1.4
>
>
> When an application consists of different implementation bundles, it is not
> possible at the moment to share the same HTTP context which makes it
> difficult to rely on Servlet container support for sessions, security, etc.
> Note that right now it is possible for a bundle to use a combination of
> HttpContext and relative ws/rs addresses, example,
> {code}
> "org.apache.cxf.rs.httpservice.context=/rs"
> "org.apache.cxf.rs.address="/service"
> {code}
> will lead to "/rs/service" relative base address be created for a given
> endpoint.
> It should be possible to do
> {code}
> // First bundle
> "org.apache.cxf.rs.httpservice.context=/rs"
> "org.apache.cxf.rs.address="/service1"
> // Second bundle
> "org.apache.cxf.rs.httpservice.context=/rs"
> "org.apache.cxf.rs.address="/service2"
> {code}
>
> with both bundles binding to "/service" HTTP context but having different
> base addresses ("/rs/service1", "/rs/service2").
> Perhaps we can also optimize when only relative ws/rs address property is
> set, example:
> {code}
> // First bundle
> "org.apache.cxf.ws.address="/service1"
> // Second bundle
> "org.apache.cxf.ws.address="/service2"
> {code}
>
> means that both bundles have to be bound to the default CXF "/cxf" or
> "/services" context
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira