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

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

    Lekkie Omotayo Newbie

      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:



        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"


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


        <ref bean="restRequestResourceBean" />



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

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



        <ref bean="cors-filter" />

        <ref bean="oauthFilter" />

        <ref bean="cxfExceptionHandler"/>



               <ref bean="loggingInInterceptor"/>



               <ref bean="loggingOutInterceptor"/>



               <ref bean="loggingOutInterceptor"/>



               <ref bean="loggingInInterceptor"/>




      My Resource looks like:




        @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)