Monday, July 11, 2016

How to connect WSO2 App Manager with WSO2 DAS

Configuring MYSQL

  1. Create new database called APPM_STATS_DB in MYSQL server.
  2. Create tables inside the created database by executing script.

Configuring WSO2 DAS

  1. Download WSO2 DAS 3.0.1
  2. If App Manager and DAS are running on the same machine, follow this step.
    Set Offset value to 3 in <DAS_HOME>/repository/conf/carbon.xml

  3. Specify the datasource definition  in the  <DAS_HOME>/repository/conf/datasources/master-datasources.xml
     to connect early created APPM_STATS_DB database.

    <datasource> <name>WSO2AM_STATS_DB</name> <description>The datasource used for setting statistics to APP Manager</description> <jndiConfig> <name>jdbc/WSO2AM_STATS_DB</name> </jndiConfig> <definition type="RDBMS"> <configuration> <url>jdbc:mysql://localhost:3306/APPM_STATS_DB?autoReconnect=true</url> <username>db_username</username> <password>db_password</password> <driverClassName>com.mysql.jdbc.Driver</driverClassName> <maxActive>50</maxActive> <maxWait>60000</maxWait> <testOnBorrow>true</testOnBorrow> <defaultAutoCommit>false</defaultAutoCommit> <validationQuery>SELECT 1</validationQuery> <validationInterval>30000</validationInterval> </configuration> </definition> </datasource>

    Note : Auto Commit option should be disable when working with DAS.
  4. Copy the database driver to <DAS_HOME>/repository/components/lib folders.
  5. Restart DAS server.
  6. Login to DAS Admin console.
  7. Navigate to Home > Manage > Carbon Applications > Add and upload the .car file

Configuring WSO2 App Manager


  1. Change following configurations in <APPM_HOME>/repository/conf/app-manager.xml
  2. Specify the datasource definition  in the  <APPM_HOME>/repository/conf/datasources/master-datasources.xml
    <datasource> <name>WSO2AM_STATS_DB</name> <description>The datasource used for setting statistics to APP Manager</description> <jndiConfig> <name>jdbc/WSO2AM_STATS_DB</name> </jndiConfig> <definition type="RDBMS"> <configuration> <url>jdbc:mysql://localhost:3306/APPM_STATS_DB?autoReconnect=true</url> <username>db_username</username> <password>db_password</password> <driverClassName>com.mysql.jdbc.Driver</driverClassName> <maxActive>50</maxActive> <maxWait>60000</maxWait> <testOnBorrow>true</testOnBorrow> <defaultAutoCommit>false</defaultAutoCommit> <validationQuery>SELECT 1</validationQuery> <validationInterval>30000</validationInterval> </configuration> </definition> </datasource>
  3. Copy the database driver to <APPM_HOME>/repository/components/lib folders.
  4. Restart App manager.

1 comment:

  1. Can i create sample project which uses wso2 DSS, wso2 DAS?

    ReplyDelete