doHeaders method is blocking threads in EPP 5.1

Solution Unverified - Updated -

Issue

We have a portlet placed in all the portal pages that includes some tags in the portal

using the doHeaders method. It works like:
   protected void doHeaders(RenderRequest request, RenderResponse response) {
       super.doHeaders(request, response);
       Element headElem = response.createElement("script");
       headElem.setAttribute("language", "javascript");
       headElem.setAttribute("src", "/javascript/custom.js");
       headElem.setAttribute("type", "text/javascript");
       response.addProperty(MimeResponse.MARKUP_HEAD_ELEMENT, headElem);
       ...
   }

When doing a stress test, we have observed that the first RenderResponse.createElement call blocks the thread. This has a negative effect on performance during our stress test.

Environment

  • JBoss Enterprise Portal Platform (EPP)
    • 5.1.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content