cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JBert (Commented) (JIRA)" <>
Subject [jira] [Commented] (DOSGI-110) Unable to export multiple services
Date Wed, 29 Feb 2012 08:35:57 GMT


JBert commented on DOSGI-110:

I'll state it more clearly then: it's likely easier to fix DOSGi rather than refactoring CXF's
use of Spring bean singletons. I therefore choose to alter DOSGi and give no support for binding
a service as http://localhost/myservice when using ````.

If I look at the code today, th CXF servlet blueprint is not used (DOSGi registers its own
servlet on the HttpService). You also cannot bind to '/' as I think that would disable all
other servlets on the HttpService.

So my proposal is to change DOSGi: it should bind a single servlet using a fixed (but configurable)
alias (e.g. /dosgi) and then register all DOSGi services using the address they specified,
relative to the servlet. This means that a user will need to look for his servlet at /dosgi/foo,
but at least CXF won't throw exceptions.

Alternatively, the CXF blueprint descriptor could be used, but then we need to retrieve that
servlet and bind DOSGi services to that.

At any rate, I believe that it's not worth to support binding services using their own servlet
alias. If a user really wants to expose his service as /myservice, let them write their own
servlet or specify ```` to start a new HttpService.

This change shouldn't affect remote clients. They need to configure the full URI anyway.
> Unable to export multiple services
> ----------------------------------
>                 Key: DOSGI-110
>                 URL:
>             Project: CXF Distributed OSGi
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: Karaf 2.2.5, DOSGi multi-bundle, CXF 2.5.2 from DOSGi multi-bundle,
Aries transaction manager
>            Reporter: JBert
>            Priority: Critical
>         Attachments:
> When I register more than one service, the second service will make the following exception
be printed to the console (this exception is nowhere caught until it reaches the java.concurrent
> {quote}
> Exception in thread "pool-9-thread-4" java.lang.RuntimeException: Soap 1.1 endpoint already
registered on address /
>         at org.apache.cxf.binding.soap.SoapBindingFactory.addListener(
>         at org.apache.cxf.endpoint.ServerImpl.start(
>         at org.apache.cxf.frontend.ServerFactoryBean.create(
>         at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
>         at org.apache.cxf.dosgi.dsw.handlers.HttpServiceConfigurationTypeHandler.createServer(
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportService(
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$
>         at Method)
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(
>         at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(
>         at org.apache.cxf.dosgi.topologymanager.TopologyManager$
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(
>         at java.util.concurrent.ThreadPoolExecutor$
>         at 
> {quote}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message