This documentation is for WSO2 Data Services Server 3.0.1. View documentation for the latest release.

In the Standalone Mode Using the transports.xml File

In addition to the two methods discussed above, there is a third method to globally configure transport receivers in Carbon, which works only when Carbon is running in the standalone mode (in other words, no external servelet container is being used to deploy Carbon). By default, WSO2 Carbon and all Carbon-based products run in the standalone mode. Hence, it is important that users be aware of this configuration method.

When Carbon is running in the standalone mode, one could use the <CARBON_HOME>/repository/conf/mgt-transports.xml file to specify transport receiver configurations. By default, you will find the HTTP and HTTPS transports. mgt-transports.xml file is similar to the syntax used in the axis2.xml file. One difference is the <transport> element replacing <transportReceiver> element. The default HTTP receiver configuration specified in the mgt-transports.xml file is given below.

<transport name="http" class="org.wso2.carbon.server.transports.http.HttpTransport">
   
       <parameter name="protocol">HTTP_11_NIO</parameter>
       <parameter name="port">${Ports.ServletTransports.HTTP}</parameter>
   
        <!-- Uncomment the following to enable Apache2 mod_proxy. The port on the Apache server is 80 in this case. -->
        <!--<parameter name="proxyPort">80</parameter>-->
        <!--<parameter name="address">127.0.0.1</parameter>-->
   
        <parameter name="maxHttpHeaderSize">8192</parameter>
        <parameter name="acceptorThreadCount">2</parameter>
        <parameter name="maxThreads">250</parameter>
        <parameter name="minSpareThreads">50</parameter>
        <parameter name="disableUploadTimeout">false</parameter>
        <parameter name="connectionUploadTimeout">120000</parameter>
        <parameter name="maxKeepAliveRequests">200</parameter>
        <parameter name="acceptCount">200</parameter>
        <parameter name="server">WSO2 Carbon Server</parameter>
   
        <parameter name="compression">on</parameter>
        <parameter name="compressionMinSize">2048</parameter>
        <parameter name="noCompressionUserAgents">gozilla, traviata</parameter>
        <parameter name="compressableMimeType">
   
text/html,text/javascript,application/x-javascript,application/javascript,application/xml,text/css,application/xslt+xml,text/xsl,image/gif,image/jpg,image/jpeg
        </parameter>
   
</transport>

There is a fundamental difference between transports configured in axis2.xml and transports configured in mgt-transports.xml. Transport receivers configured in mgt-transports.xml will be loaded through a special "Transport Manager" implementation in Carbon. Therefore, the classes specified in the <transport> element must implement the interface org.wso2.carbon.server.transports.Transport. Currently only the default servlet transports of Carbon can be configured from the mgt-transports.xml file.

Note

For more details on config parameters, see http://tomcat.apache.org/tomcat-7.0-doc/config/http.html

Copyright © WSO2 Inc. 2005-2013