3 Replies Latest reply on Feb 13, 2009 3:20 AM by Lazarin Lazarov

    Performance problem with Jbossws client

    Vincent Jassogne Newbie

      Dear,

      I have a serious performance problem with a webservice client that I explained here :

      I took the wsdl http://developer.ebay.com/webservices/latest/ebaySvc.wsdl. This wsdl is about 3Mb but I was able to generate the stubs.

      Now that I want to invoke it with the following code :

       URL url = Thread.currentThread().getContextClassLoader().getResource("eBaySvc.wsdl");
       EBayAPIInterfaceService service = new EBayAPIInterfaceService(url, new QName("urn:ebay:apis:eBLBaseComponents", "eBayAPIInterfaceService"));
       System.out.println("Init... 1 ");
      
       EBayAPIInterface eBayAPIInterface = service.getEBayAPI();
       System.out.println("Init... 2");
      
      


      It take about 1 minutes between the 2 system.out :-(

      My question is : how can I improve the performance here ? Do you thing is a good idea to put it static in order to gain
      performance when invoking the service ?

      Thanks for you support.

        • 1. Re: Performance problem with Jbossws client
          Lazarin Lazarov Newbie

          I have similar problem with poor jboss performance.
          I tried a simple example with 2 library sets - let's call them jboss & sun



            jboss:

            jboss-jaxrpc.jar
            jboss-jaxws.jar
            jboss-saaj.jar


            sun:

            jaxb-xjc.jar
            jaxws-api.jar
            jaxws-rt_sun.jar
            jsr181-api.jar
            saaj-api.jar
            saaj-impl.jar
            stax-1.2.0.jar
            stax-ex.jar
            streambuffer.jar


            common libraries :

            activation.jar
            commons-logging.jar
            concurrent.jar
            ebaycalls.jar
            javassist.jar
            jaxb-api.jar
            jaxb-impl.jar
            jboss-common.jar
            jboss-remoting.jar
            jboss-xml-binding.jar
            jbossws-client.jar
            jbossws-common.jar
            jbossws-spi.jar
            jsr173_api.jar
            log4j.jar
            mail.jar
            policy.jar
            wsdl4j-1.6.2.jar
            xercesImpl.jar


            With common+sun_libs the initial call takes 8.2sec and consumes 34MB
            With common+jboss_libs it takes 60sec and consumes 150MB

            Does anyone have an idea what's going on? Why the JBoss WS implementation is so slow?

            • 2. Re: Performance problem with Jbossws client
              Alessio Soldano Master

              Profiling would probably help in understanding what's happing there. When wsdl contracts with huge type models are involved, the port creation can be quite time consuming because a lot of classes are created. Perhaps you could evaluate re-using the port instance once it has been created.
              In case you're seeing different performance between the first invocation and following ones, instead, please refer to http://jbossws.jboss.org/mediawiki/index.php?title=Tuning.
              Finally, regarding the library comparison, I'd say also try using recent version of jbossws (from the libs names I'd say you're using old ones).

              • 3. Re: Performance problem with Jbossws client
                Lazarin Lazarov Newbie

                I tested it with latest 3.0.5GA.
                It seems it's not a bug but just annoying way of working. Debugging it showed that the eagerInitialize() is the evil.
                It's not a fun to wait 60 seconds for the first call to the eBay SDK.