user manual
50 BES Developer’s Guide
Large data transfer
Typically, the content length is known in advance for static content, but is not
known for dynamic content.
Downloading large data
The following modes are available for downloading large data from the
Borland web container to the browser:
■
Chunked download
■
Non-chunked download
Implementing chunked download
In the chunked download mode, the Borland web container does not wait until
it has all the data to send. As soon as servlet generates the data, the web
container starts sending the data to the browser via Apache in fixed size
buffers.
Because the data is flushed as soon as it is available, the chunked download
mode of transfer has low memory requirements both on Apache and the
Borland web container. The browser user sees data as it arrives rather than as
one large lump at the end of the full transfer.
Enabling chunked download
To enable chunked download mode, you update the Borland web container
server.xml file which is stored in your Partition's data directory:
adm/tomcat/conf/
For more information, go to Chapter 4, “Web components”.
To enable the chunked download:
1 In the Borland web container server.xml, locate the <Service name="IIOP">
section of the code.
2 By default, the enableChunking attribute is set to false. Change this value to
enableChunking="true"
3 By default, the download buffer size is set to 4096. To change it, use the
downloadBufferSize attribute as follows:
downloadBufferSize=<value>
Where <value> is a numeric value >0.
Note If an invalid value is presented (non numeric/negative number) then the
default 4096 value is employed.
The chunked download mode of transfer has an overhead of an extra thread
per each request.
Known content length versus unknown
Based on whether content length is known in advance or not, chunked
download mode can take one of the following two paths:










