com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Configuring Transports Globally

You can configure and enable transports at service level or global level using either of the following methods. Globally enabled and configured transports effect all services deployed in a running WSO2 product instance.

Using the axis2.xml file

WSO2 products come with a configuration file named axis2.xml in <PRODUCT_HOME>/repository/conf/axis2 directory. This is similar to the axis2.xml file that comes with Apache Axis2 and Apache Synapse. It contains the global configuration of WSO2 products. The axis2.xml configuration generally includes configuration details for modules, phases, handlers, global configuration parameters and transports. The elements <transportReceiver> and <transportSender> are used to configure transport listeners and senders respectively. In the axis2.xml file that comes with WSO2 products, some transports are already configured and enabled by default, including the HTTP and HTTPS transports.

WSO2 products do not use the HTTP/S servlet transport configurations that are in the axis2.xml file. Instead, they use Tomcat-level servlet transports, which are used by the management console in <PRODUCT_HOME>/repository/conf/tomcat/catalina-server.xml file.

Given below is an example JMS transport receiver configuration in the axis2.xml file.

<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
        <parameter name="myTopicConnectionFactory">
            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
        </parameter>

        <parameter name="myQueueConnectionFactory">
            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
        </parameter>

        <parameter name="default">
            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
        </parameter>
</transportReceiver>

<transportReceiver> element has the following attributes and sub elements:

  • name - A mandatory attribute which indicates a unique name for the transport receiver.
  • class - A mandatory attribute which indicates the transport receiver implementation class.
  • parameters - Configuration parameters for the transport receiver. It should be included as child elements of the <transportReceiver> element.

Similarly use <transportSender> element to configure and enable transport senders in WSO2 products.

  • The axis2.xml file is loaded to memory only during server startup. Therefore, you must restart the server to apply any changes you make to the file while the server is up and running.
  • Simply having <transportReceiver> and <transportSender> elements in the axis2.xml file causes those transports to be loaded and activated during server startup. Therefore, you must include any dependency JARs required by those transport implementations in the server classpath to prevent the server from running into exceptions at startup. In addition to that, an inaccurate transport configuration (for example, a wrong parameter value) might cause the transport to be not enabled properly.

Using catalina-server.xml file

In addition to the above, transport receivers can be configured globally using the <PRODUCT_HOME>/repository/conf/tomcat/catalina-server.xml file. The default HTTP/S configuration specified in the catalina-server.xml file is given below:

Default HTTP/S Config in catalina-server.xml
<!--  optional attributes:
    proxyPort="80"-->

<Connector  protocol="org.apache.coyote.http11.Http11NioProtocol"
            port="9763"
            bindOnInit="false"
            maxHttpHeaderSize="8192"
            acceptorThreadCount="2"
            maxThreads="250"
            minSpareThreads="50"
            disableUploadTimeout="false"
            connectionUploadTimeout="120000"
            maxKeepAliveRequests="200"
            acceptCount="200"
            server="WSO2 Carbon Server"
            compression="on"
            compressionMinSize="2048"
            noCompressionUserAgents="gozilla, traviata"
            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" URIEncoding="UTF-8"/>
   
<!--  optional attributes:proxyPort="443"-->

<Connector  protocol="org.apache.coyote.http11.Http11NioProtocol"
            port="9443"
            bindOnInit="false"
            sslProtocol="TLS"
            maxHttpHeaderSize="8192"
            acceptorThreadCount="2"
            maxThreads="250"
            minSpareThreads="50"
            disableUploadTimeout="false"
            enableLookups="false"
            connectionUploadTimeout="120000"
            maxKeepAliveRequests="200"
            acceptCount="200"
            server="WSO2 Carbon Server"
            clientAuth="false"
            compression="on"
            scheme="https"
            secure="true"
            SSLEnabled="true"
            compressionMinSize="2048"
            noCompressionUserAgents="gozilla, traviata"
            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"
            keystoreFile="${carbon.home}/repository/resources/security/wso2carbon.jks"
            keystorePass="wso2carbon" 
            URIEncoding="UTF-8"/>

At the moment, you can configure only the default servlet transports of WSO2 using catalina-server.xml file.

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

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.