开发者

OSGi bundle restart with cxf-extension-osgi

I have a simple CXF RS bundle deployed in Fuse 4.2 that works fine upon initial installation. But, when I update or re-install the bundle, the REST service in no longer accessible.

I tried a various configurations and found that using cxf-extension-osgi was the issue...

from this...

<import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml"/>

to this...

<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml"/>

Also, I updated the address to be non-relative...ending up with this configuration (that works after bundle restarts, etc)

<import resource="classpath:META-INF/cxf/cxf.开发者_运维问答xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />

<jaxrs:server id="testService" address="http://localhost:9000/">
    <jaxrs:serviceBeans>
        <ref bean="testBean" />
    </jaxrs:serviceBeans>
</jaxrs:server>

Any idea what is causing this issue when using cxf-extension-osgi? Also, what is the trade-off when using cxf-extendsion-http-jetty instead (functional, performance, etc)?

thanks


Sorry, it seems to be error in cxf/servicemix integration. The problem is, cxf tries to register service under the address that is already used (by older version of this service).

Both REST and SOAP services are unaccessible after bundle restart/update. Restart of whole servicemix. Hovewer, when business logic is in other bundle, and the bundle with SOAP/REST service contains only interface, restart is needed only when interface has changed.

We were fighting with this error long, but unfortunatelly without effort.


I just tested this in Fuse 4.3.0-fuse-03-00 and it seems to work fine. The related issue below must have addressed my issue as well...

https://issues.apache.org/jira/browse/CXF-2947

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜