Adding a data source by using developer tools

You can add a data source to your application using the developer tools.

Procedure

  1. In the Project Explorer view, expand liberty_name > servers > server_name > server.xml, and select Open.
  2. In the design view, select Server Configuration, and click Add.
  3. On the Select item to add to Server Configuration: page, select Data Source and fill in the JNDI name.
  4. On the Data Source Details panel, alongside JDBC Driver, click Add.
  5. On the Configure a JDBC driver page,
    • In the Library ref: field, select an option from the drop-down list, or click Add to create a new one.
      • In the Fileset ref: field, select an option from the drop-down list, or click Add to create a new one.
        • In the Base directory field, type a path for your base directory or click Browse to locate a library location path. Use the drop-down arrow next to Browse to choose between browsing for a relative path or browsing for an absolute path.
        • In the Includes field, type the name of your data source, for example derby.jar, or click Browse to locate the data source archive file that you want to include.
        • In the Excludes field, type the archives that you want to exclude, or click Browse to locate the data source archive file that you want to exclude.
  6. Your JDBC data source has been added to your application.