Versions Compared

Key

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

...

  1. In the management console, click the Configure tab, and then click Data Sources.  
  2. Click Add Data Source.  
  3. Specify the required options for connecting to the database. The available options are based on the type of datasource you are creating:

Configuring an RDBMS datasource
Anchor
rdbms
rdbms

When you select RDBMS as the datasource type, the following screen appears:

This is the default RDBMS datasource configuration provided by WSO2. You can also write your own RDBMS configuration by selecting the custom datasource option. Enter values for the following fields when using the default RDBMS datasource configuration:

  • Data Source Type: RDBMS
  • Name: Name of the datasource (must be a unique value)
  • Data Source Provider: Specify the datasource provider as described below.
  • Driver: The class name of the JDBC driver to use. Be sure to copy the JDBC driver relevant to the database engine to the <ESB_HOME>/repository/components/dropins and <ESB_HOME>/repository/components/lib directories. For example, if you are using MySQL, you would specify com.mysql.jdbc.Driver as the driver and would copy  mysql-connector-java-5.XX-bin.jar to these directories. If you do not copy the driver to these directories when you create the datasource, you will get an exception similar to "Cannot load JDBC driver class com.mysql.jdbc.Driver".
     
  • 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 as described below
  • Data Source Configuration Parameters: Allows you to specify advanced configuration properties the datasource connection pool parameters when creating an RDBMS datasource

Many of these fields are similar to those in DBCP. For more information, see: http://commons.apache.org/dbcp/configuration.html

After creating datasources, you can edit and delete them as needed.

...