In the context of a migration from ServiceMix 5.1.4 (smx-5) to ServiceMix 7.0.1 (latest stable release) (smx-7) I can see a strange behaviour on my camel routes using the cxf:RsServer
My Camel route looks like this:
from("cxfrs:bean:rsServer?bindingStyle=SimpleConsumer&synchronous=true")
.setBody(simple("${body[0]}"))
.marshal(df)
.convertBodyTo(String.class)
.to("{{user.request.endpoint}}")
.process(checkResponseStatusCode())
.unmarshal(df);
and in the blueprint I have:
<cxf:rsServer id="rsServer" address="/user-data/v1"
loggingFeatureEnabled="true" depends-on="user-rest-v1"
serviceClass="org.my.company.user.rest.v1.resources.UserDataServiceRest"
staticSubresourceResolution="true">
<cxf:providers>
<bean name="jacksonJsonProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" />
<ref component-id="authenticationFilter" />
</cxf:providers>
<cxf:properties>
<entry key="binding">
<ref component-id="mySecurityCxfRsBinding" />
</entry>
</cxf:properties>
</cxf:rsServer>
The class UserDataServiceRest contains the method signature and returning null
as per old camel specification.
I know it now supports Interface but I am not sure that could be the cause of my issue.
I the version smx-5 all bundles are starting in few seconds (per bundle). In smx-7 the same bundles starts in at least 2 min (per bundle).
While it takes so long, I do not see any activity in the logs.
Note that I also have the issue with server like this:
<jaxrs:server id="pingServiceSvc" address="/ping">
<jaxrs:serviceBeans>
<ref component-id="pingServiceBean" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref component-id="commonExceptionHandler" />
</jaxrs:providers>
<jaxrs:inInterceptors>
<ref component-id="requiredParametersInterceptorBean" />
</jaxrs:inInterceptors>
</jaxrs:server>
which just answers OK for any reqquest (ping service).
My settings:
- ServiceMix 7.0.1 ()
- without embedded ActiveMQ
- installed on RedHat 7 linux
- Java JDK 8 (openJDK build 1.8.0_212-b04)
UPDATE
When I tried locally (CentOS 6.10) the bundle (exposing CXF server) starts in around 20 seconds. But when it's deployed on the real server (RHEL 7) it takes more than 2 mins. I suspect a network issue but there's nothing in the logs. The configuration is almost the same... I am looking into it.