To configure a data source using the example files, you will need to create a data source definition. The content required to create a data source definition is divided into three sections.
First, you will need to import the data source class. For example:
import com.ddtek.jdbcx.jira.JiraDataSource;
Next, you will need to set the values and define the data source. For example, the following definition contains the minimum properties required to establish connection:
Note: Setting the password using a data source is generally not recommended. The data source persists all properties, including the Password property, in clear text.
JiraDataSource mds = new JiraDataSource();
mds.setDescription("My Jira Data Source");
mds.setServerName("http://mycompany.atlassian.net");
mds.setUser("jsmith");
mds.setPassword("secret");
Finally, you will need to configure the example application to print out the data source attributes. Note that this code is specific to the driver and should only be used in the example application. For example, you would add the following section for the minimum properties required to establish a connection: