Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Follow the steps given below to create RDBMS datasources for your product server. RDBMS datasources allows allow you to service enable data from relational databases.

Info

The RDBMS datasources you define using this option can be added to data services as Carbon datasources. However, during the data service creation process, you also have the option of using the common datasource types (in addition to RDBMS), such as EXCEL, CSV etc.

  1. Log in to the management console of your product and click Data Sources on the Configure tab. The datasources that are already created will be listed.
  2. Click Add Data Source to open the following screen:
  3. Select 'RDBMS' for the Data Source Type field to define an RDBMS configuration.
  4. Enter values for the remaining fields as explained below.
    • Name: Name of the datasource (must be a unique value).
    • Data Source Provider: Specify the datasource provider.
    • Driver: The class name of the JDBC driver to use
    • URL: The connection URL to pass to the JDBC driver to establish the connection.
    • User Name: The connection user name to pass to the JDBC driver to establish the connection.
    • Password: The connection password to pass to the JDBC driver to establish the connection.
    • Expose as a JNDI Data Souce: Allows you to specify the JNDI data source.
    • Data Source Configuration Parameters: Allows you to specify the datasource connection pool parameters when creating an RDBMS datasource.
  5. Be sure to copy the JDBC driver relevant to the database engine to one of the locations given below.
    • If the driver is a JAR file, add it to the <PRODUCT_HOME>/repository/components/dropins and <PRODUCT_HOME>/repository/components/lib directories. For lib directory, so that it will be converted to an OSGI bundle and copied to the dropins directory during server startup. For example, if you are using MySQL, you would specify specify com.mysql.jdbc.Driver as  as the driver and would copy copy mysql-connector-java-5.XX-bin.jar to these directories.  to this directory.
    • If the driver is already an OSGI bundle, you can directly add it to the <PRODUCT_HOME>/repository/components/dropins directory. 
    If you do not copy the driver to these directories when you create the datasourcethe relevant directory, you will get an exception similar to "Cannot load JDBC driver class com.mysql.jdbc.Driver" .
  6. URL: The connection URL to pass to the JDBC driver to establish the connection
  7. User Name: The connection user name to pass to the JDBC driver to establish the connection
  8. Password: The connection password to pass to the JDBC driver to establish the connection
  9. Expose as a JNDI Data Souce: Allows you to specify the JNDI data source.
  10. Data Source Configuration Parameters: Allows you to specify the datasource connection pool parameters when creating an RDBMS datasourcewhen you create the datasource.
  11. After creating datasources, they appear on the Data Sources page. If required, you can edit or delete them by clicking Edit or Delete.

...