Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

There are some methods to configure and enable transports enable Transports in WSO2 Carbon or any Carbon based solution.

...

Anchor
Configuring Servlet Transports in the Standalone Mode Using the transports.xml File
Configuring Servlet Transports in the Standalone Mode Using the transports.xml File

Configuring Servlet Transports in the Standalone Mode Using

...

the catalina-server.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 and 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<PRODUCT_HOMEHOME>/repository/conf/tomcat/transportscatalina-server.xml file to specify transport receiver configurations. By default, you will find the HTTP and HTTPS servlet transports configured in this file. The XML syntax to configure transports in the transportscatalina-server.xml file is similar to the syntax used in the axis2.xml file, with only difference being the <transport> element taking the place of the <transportReceiver> element. The default HTTP receiver configuration specified in the transportsthe catalina-server.xml file is given below.

Code Block
<transport name="http" class="org.wso2.carbon.server.transports.http.HttpTransport">
      <parameter name="port">9763</parameter>
      <parameter name="maxHttpHeaderSize">8192</parameter>
      <parameter name="maxThreads">150</parameter>
      <parameter name="minSpareThreads">25</parameter>
      <parameter name="maxSpareThreads">75</parameter>
      <parameter name="enableLookups">false</parameter>
      <parameter name="disableUploadTimeout">false</parameter>
      <parameter name="clientAuth">false</parameter>
      <parameter name="maxKeepAliveRequests">100</parameter>
      <parameter name="acceptCount">100</parameter>
      <parameter name="compression">force</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>

However, there is a fundamental difference between transports configured in axis2.xml and transports configured in transportscatalina-server.xml. Transport receivers configured in transportscatalina-server.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 transportsfrom catalina-server.xml file.

Configuring Transports at Service Level
Anchor
Configuring Transports at Service Level
Configuring Transports at Service Level

...