In cApp development time, you have to specify a Server Role 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.
...
This is the easiest way to set the server role of your Carbon instance.
See Adding a Server Role and Deleting a Server Role Creating and Deploying a C-App for information on how to do this.
Info | title | Tip
---|
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.
Code Block |
---|
<ServerRoles> <Role>ApplicationServer<<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.
Info | |
---|---|
Tip | Before setting this, you have to make sure that the current server has the capabilities of deploying Axis2 services and data services. |
...
Code Block |
---|
sh wso2server.sh -DserverRoles=appserver1,dataservices1 |
Info | |
---|---|
Note | 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 registry and after that, the values in Registry are given priority over the values set using other two methods. |
...