Carbon Data Sources - User Guide

Carbon Data Sources

Content

Introduction

Carbon Data Source feature in Data Services Server can be used to create data sources which can be used inside data services directly through the name of the Carbon Data Source. The datasources created using Carbon Data Source feature will be persisted, and can be used when ever required.

Create Carbon DataSource

To create the carbon data source click on the Data Sources menu item under the configuration.


DS

Figure 1: Create Carbon Data Source menu


Click on 'Add Data Source' link in Data Sources page which will direct you to a page where you can enter the details for the data source.

You can select a datasource provider from the highlighted combo box. For the 'default' Data Source Provider, given connection properties Driver, URL, User Name and Password need to be entered.


DS

Figure 2: Creating the Carbon Data Source


If you need to add a data source supported by an External Datasource Provider class such as com.mysql.jdbc.jdbc2.optional.MysqlXADataSource, select 'external' as the Data Source Provider. Then enter the name and value of connection properties by clicking 'Add Property'. Given below is an example data source of External Datasource Provider with eneterd values.


DS

Figure 3: Creating the Carbon Data Source of External Data Source Provider

After entering the details you can test the connection by click on 'Test Connection' button on bottom of the page. Then click 'Add' to save the data source.


Once you have created the carbon data source, you can use it inside the data service. Select the 'Carbon Data Source' as the type of the data source in Add data source page in the data services wizard. Select the carbon data source name which you have created from the drop down list.


DS

Figure 4: Creating the data source for Carbon Data Source


Expose as a JNDI Data source

The adding data source can be exposed as a JNDI Data Source as well. Expand 'Expose as a JNDI data source' and enter the required values. If the data source will be using Data Source Factory, click on the checkbox 'Use Data Source Factory' and define the JNDI properties. Given below is an example JNDI configuration.


DS

Figure 5: Expose as a JNDI Data source


When creating the data service select the data source type as 'JNDI' and enter the values to be used to connect to the previously created JNDI enabled data source.


DS

Figure 6: Creating the data source for JNDI


Defining Data Source Configuration Parameters

By expanding the 'Data Source Configuration Parameters' you can set the jdbc-pool properties for the data source.


DS

Figure 7: Expanding Data Source Configuration Parameters


Data Source Configuration Parameters with default values is showing below.


DS

Figure 8: Data Source Configuration Parameters