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

Configuring Server Role

In cApp development time, you have to specify a server role for each and every artifact in the cApp because at development time, the physical server in which a particular artifact will be deployed is unknown. Therefore, a logical Server Role is assigned for each and every artifact.

For example, if you are developing an Axis2 service and are going to deploy all your services in a single AppServer instance in the production setup, you may set the server role as "appserver1."

At the deployment time of the cApp, you have to set the Server Roles for each and every Carbon instance in your setup. You can set one or more roles which can be enacted by the current Carbon instance. The product name is set as the default value for the Server Role of each product. The following three methods can be used to set the server role.

Using Server Roles Manager UI

This is the easiest way to set the server role of your Carbon instance.

See Creating and Deploying a C-App for information on how to do this.

This is the most recommended way to configure your server roles.

Using Carbon XML configuration

In the $GREG_HOME/repository/conf/carbon.xml file, you can find the following element.

<ServerRoles>
      <Role>GovernanceRegistry</Role>
</ServerRoles>

You can set multiple role elements here to specify the roles acted by the current server.

For example, if you want this server to act as "appserver1" and "dataservices1" servers, the configuration will be as follows.

Before setting this, you have to make sure that the current server has the capabilities of deploying Axis2 services and data services.

<ServerRoles>
    <Role>appserver1</Role>
    <Role>dataservices1</Role>
</ServerRoles>

When you deploy a cApp artifact on this server, all artifacts which have the above two Server Roles will be deployed on the current instance. Others will be ignored.

Using a system property

You can use the system property serverRoles to specify the Server Roles that can be enacted by the current Carbon instance. So when you start the server, pass the Server Roles as a comma separated list as follows.

For example:

sh wso2server.sh -DserverRoles=appserver1,dataservices1

Once you use the Server Roles UI to configure your Server Roles, you cannot change that configuration using other two methods because when you use the UI, the Server Roles will be stored in the registry and after that, the values in Registry are given priority over the values set using other two methods.

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