Table of Contents |
---|
Introduction
This sample demonstrates how to setup WSO2 Business Activity Monitor (BAM) to collect and summarize runtime statistics from the WSO2 API Manager and generate bills for API consumers on usage of consumers.
Prerequisites
- Java Development Kit/JRE version 1.6.* or 1.7.* JDK setup instructions are given in section Installation Prerequisites.
- Download and install WSO2 BAM using the instructions given in BAM Installation Guide: http://docs.wso2.org/wiki/display/BAM201/Installation+Guide.
Building and Running the Sample
Configuring BAM
1. Open $BAM_HOME/repository/conf/carbon.xml file where BAM_HOME is the BAM binary distribution folder that was downloaded as a prerequisite above. Change the carbon.xml file's port offset to 1. This is done to avoid any port conflicts of running two WSO2 Carbon instances in the same machine.
...
4. Start WSO2 BAM server by running wso2server.bat (on Windows) and wso2server.sh (on Linux).
Configuring API Manager
5. To enable API statistics collection, configure the following properties in $AM_HOME/repository/conf/api-manager.xml file.
...
8. Copy $AM_HOME/samples/Billing/billing-conf.xml file into $AM_HOME/repository/conf folder.
View Billing Information
Once the above configurations are done, log in to API Store Web application (https:
//<YourHostName>:9443/store
). You will see the menu items required for API Monetization are now visible in the Store.
...