
JBoss Remoting jars (jboss-remoting-core.jar and jboss-remoting-servlet.jar) have been patched.

The reason for this was that method org.jboss.remoting.transport.servlet.ServletServerInvoker.processRequest(HttpServletRequest, byte[], HttpServletResponse)
returned generated ByteArrayOutputStream, and must return byte[]. To do this? ByteArrayOutputStream.toByteArray() method was called, and this
method internally duplicates byte array, which leads to significant memory usage for large objects.

In the patched version, the processRequest method above has been changes to return ByteArrayOutputStream itself, shich is later written to
response output stream directly.

The patch was made by decompiling the JARs using Fernflower, creating Eclipse project, and then taking modified classes from Eclipse classes folder,
replacing existing classes in the JArs.

List of patched classes:

org.jboss.remoting.transport.servlet.web.ServerInvokerServlet
org.jboss.remoting.transport.servlet.ServletServerInvokerMBean
org.jboss.remoting.transport.servlet.ServletServerInvoker
org.jboss.remoting.util.ServletSecurityUtility