Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-27324

[GSS](8.0.z) JBWS-4424 - Heavy load in CXF Service.getPort calls from a servlet causes performance issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 8.0 Update 2
    • Web Services
    • None

      Heavy load in CXF Service.getPort calls from a servlet, will cause performance issue from: 

      https://github.com/apache/cxf/blob/main/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SOAPBindingUtil.java#L92

       

      @WebServlet(
          urlPatterns = {"/WSAccess"},
          asyncSupported = true
      )
      public class WSAccessServlet extends HttpServlet {
          public WSAccessServlet() {
          }
      
          protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              String endPointAddress = "http://localhost:8080/jaxws-retail/ProfileMgmtService/ProfileMgmt";
              QName serviceName = new QName("http://org.jboss.ws/samples/retail/profile", "ProfileMgmtService");
      
              try {
                  URL wsdlURL = new URL(endPointAddress + "?wsdl");
                  Service service = Service.create(wsdlURL, serviceName);
                  ProfileMgmt proxy = (ProfileMgmt)service.getPort(ProfileMgmt.class);
                  Customer customer = new Customer();
                  customer.setFirstName("Jayé");
                  customer.setLastName("Boss");
                  customer.setCreditCardDetails("newbie");
                  DiscountRequest dRequest = new DiscountRequest();
                  dRequest.setCustomer(customer);
                  DiscountResponse dResponse = proxy.getCustomerDiscount(dRequest);
                  Customer responseCustomer = dResponse.getCustomer();
                  System.out.format("%s %s's discount is %.2f%n", responseCustomer.getFirstName(), responseCustomer.getLastName(), dResponse.getDiscount());
              } catch (Exception var12) {
                  var12.printStackTrace();
              }
      
          }
      } 

       

      The first trying load SOAP relevant class  with current context loader(deployment classloader) always fail. This takes a lot of CPU time and throws other JDK exception  when this is called with high concurrent requests. 

       

              rhn-engineering-ema Jim Ma
              rhn-support-aogburn Aaron Ogburn
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: