0 Replies Latest reply on Oct 18, 2013 6:24 AM by lekkie

    DozerBeanMapper takes more than 500ms in cxfrs endpoint, any explanation for this?

    lekkie

      I noticed my service takes more than 600ms, even 1000ms sometimes. And all the time are spent between cxfrs endpoint component my bean. Actually, the tiem is spent before cxfrsendpoint/camel hands over execution to my bean. aftering turning on debug in net.sf.dozer I noticed after the lines below, it waits for a long while (usually about 600ms - 1000ms) before proceeding to hand over execution to the next bean endpoint in my route.

       

      10:47:58,621 | DEBUG | tp766924432-3604 | DozerInitializer                 | 282 - net.sf.dozer.dozer-osgi - 5.3.2 | Tried to perform initialization when Dozer was already started.

      10:47:58,621 | INFO  | tp766924432-3604 | DozerBeanMapper                  | 282 - net.sf.dozer.dozer-osgi - 5.3.2 | Initializing a new instance of dozer bean mapper.

       

       

      My route looks like:

       

      <from

        uri="cxfrs:bean:restv1Service?resourceClass=org.service.rest.resources.RestRequestResource" /> <!-- Camel spends time here initializing dozer bean mapper and doing God knows what.-->

      <bean ref="restBean" method="createRequest" /> <!-- it takes btw 600ms - 1000ms to get here -->

      .........

       

       

      my cxfrs bean looks like:

       

      <cxf:rsServer id="restv1Service"

        address="${rest.ssl.url.prefix}/v1/myservice"

        staticSubresourceResolution="true" depends-on="port-config">

        <cxf:serviceBeans>

        <ref bean="restRequestResourceBean" />

        </cxf:serviceBeans>

        <cxf:extensionMappings>

        <entry key="json" value="application/json" />

        <entry key="xml" value="application/xml" />

        </cxf:extensionMappings>

        <cxf:providers>

        <ref bean="cors-filter" />

        <ref bean="oauthFilter" />

        <ref bean="cxfExceptionHandler"/>

        </cxf:providers>

        <cxf:inInterceptors>

               <ref bean="loggingInInterceptor"/>

           </cxf:inInterceptors>

           <cxf:outInterceptors>

               <ref bean="loggingOutInterceptor"/>

           </cxf:outInterceptors>

           <cxf:outFaultInterceptors>

               <ref bean="loggingOutInterceptor"/>

           </cxf:outFaultInterceptors>

           <cxf:inFaultInterceptors>

               <ref bean="loggingInInterceptor"/>

           </cxf:inFaultInterceptors>

        </cxf:rsServer>

       

      My Resource looks like:

       

      @POST

        @Path("/")

        @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML})

        @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML})

          public void getService(String request)

        {

       

        }