Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed an incorrect command in an example DOCUMENTATION-8165

When a WSO2 product starts, it starts all components, features and related artifacts bundled with it. Multi-profile support allows you to run the product on a selected profile so that only the features specific to that profile along with common features start up with the server.

Tip

Starting a product on a preferred profile only blocks/allows the relevant OSGI bundles. As a result, even if you start the server on a profile such as the api-store for example, you can still access the API Publisher web application.

Info
titleOSGI Bundle

OSGI bundle is a tightly coupled, dynamically loadable collection of classes, jars, and configuration files that explicitly declare their external dependencies (if any). In OSGi, a bundle is the primary deployment format. Bundles are applications that are packaged in JARs, and can be installed, started, stopped, updated, and removed.

Table of Contents

API-M Profiles

...

  1. Run the <PRODUCT_HOME>/bin/profileSetup.sh script or <PRODUCT_HOME>/bin/profileSetup.bat script based on your operating system, with the profile flag. 

    Localtabgroup
    Localtab
    titleSample commands
    Code Block
    sh <PRODUCT_HOME>/bin/profileSetup.sh  -Dprofile=<preferred-profile>
    Localtab
    titleExample
    Code Block
    titleStarting the Publisher profile
    sh <PRODUCT_HOME>/bin/profileSetup.sh  -Dprofile=api-publisher 
  2. Start the server with the specified profile. A sample command is shown below.

    Localtabgroup
    Localtab
    titleSample commands
    Code Block
    sh <PRODUCT_HOME>/bin/wso2server.sh -Dprofile=<preferred-profile>
    Localtab
    titleExample
    Code Block
    titleStarting the Publisher profile
    sh <PRODUCT_HOME>/bin/wso2server.sh -Dprofile=api-publisher

Method 2 - Optimizing while starting the server

  1. Start the server using the script based on your operating system, using the command given below.

    Localtabgroup
    Localtab
    titleSample commands
    Code Block
    sh <PRODUCT_HOME>/bin/wso2server.sh --optimize -Dprofile=<preferred-profile>
    Localtab
    titleExample
    Code Block
    titleStarting the Publisher profile
    sh <PRODUCT_HOME>/bin/profileSetupwso2server.sh --optimize -Dprofile=api-publisher
    Expand
    titleClick here to see the sample output when you start the Publisher profile
    Code Block
    Starting to optimize API Manager for the API Publisher profile
    [2018-06-19 17:36:08:045] INFO - Disabled the <DataPublisher> from api-manager.xml file
    [2018-06-19 17:36:08:055] INFO - Disabled the <JMSConnectionDetails> from api-manager.xml file
    [2018-06-19 17:36:08:066] INFO - Disabled the <transportSender name="ws" class="org.wso2.carbon.websocket.transport.WebsocketTransportSender"> from axis2.xml file
    [2018-06-19 17:36:08:072] INFO - Disabled the <transportSender name="wss" class="org.wso2.carbon.websocket.transport.WebsocketTransportSender"> from axis2.xml file
    [2018-06-19 17:36:08:074] INFO - Removed the WebSocketInboundEndpoint.xml file from ../repository/deployment/server/synapse-configs/default/inbound-endpoints/
    [2018-06-19 17:36:08:076] INFO - Removed the SecureWebSocketInboundEndpoint.xml file from ../repository/deployment/server/synapse-configs/default/inbound-endpoints/
    [2018-06-19 17:36:08:082] INFO - Removed the authenticationendpoint.war file from ../repository/deployment/server/webapps
    [2018-06-19 17:36:08:085] INFO - Removed the api#am#admin#v0.13.war file from ../repository/deployment/server/webapps
    [2018-06-19 17:36:08:087] INFO - Removed the throttle#data#v1.war file from ../repository/deployment/server/webapps
    [2018-06-19 17:36:08:090] INFO - Removed the oauth2.war file from ../repository/deployment/server/webapps
    [2018-06-19 17:36:08:093] INFO - Removed the am#sample#pizzashack#v1.war file from ../repository/deployment/server/webapps
    [2018-06-19 17:36:08:097] INFO - Removed the api#identity#consent-mgt#v1.0.war file from ../repository/deployment/server/webapps
    [2018-06-19 17:36:08:099] INFO - Removed the am#sample#calculator#v1.war file from ../repository/deployment/server/webapps
    [2018-06-19 17:36:08:102] INFO - Removed the api#am#store#v0.13.war file from ../repository/deployment/server/webapps
    [2018-06-19 17:36:08:105] INFO - Removed the client-registration#v0.13.war file from ../repository/deployment/server/webapps
    [2018-06-19 17:36:08:131] INFO - Removed store directory from ../repository/deployment/server/jaggeryapps
    Finished the optimizations
    Starting the server...

...