Below is the code i use for creating service. Would it impact the memory or
performance if I use or do not use the setBus line that is commented. This
cxf client seems to take more time to run than the existing axis client and
also seems to use high cpu. not sure if i'm doing anything wrong. Also these
services get created for each account that the service is used for as the
service url differs from account to account


    public BasicReportService createService(String aServiceURL)
    {
        BasicReportService ret = null;

        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.getInInterceptors().add(new LoggingInInterceptor());
        factory.getOutInterceptors().add(new LoggingOutInterceptor());
        factory.setServiceClass(BasicReportService.class);
        factory.setAddress(aServiceURL);
        // factory.setBus(BusFactory.getDefaultBus());

        ret = (BasicReportService) factory.create();

        Client client = ClientProxy.getClient(ret);
        HTTPConduit httpConduit = (HTTPConduit) client.getConduit();

        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
       
httpClientPolicy.setConnectionTimeout(theService.DEFAULT_API_CONNECT_TIMEOUT);
       
httpClientPolicy.setReceiveTimeout(theService.DEFAULT_API_READ_TIMEOUT);
        httpClientPolicy.setAllowChunking(false);

        httpConduit.setClient(httpClientPolicy);

        Debug.msg(Debug.INFORMATION, "BasicReportService created");
        return ret;
    }
-- 
View this message in context: 
http://www.nabble.com/service-creation---busfactory-going-to-impact-performance--tp20903304p20903304.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to