Configure the server: Configure the instance

The first thing do to configure the instance to access your samples database is create a JDBC provider and data source. The WebSphere Application Server administrative console is used for this step. To start the console, open this URL in your browser:

http://your.server.name:port/admin

where your.server.name is the hostname of your iSeries server and port is your administrative port number. The administrative port number was assigned when you created your instance. For more information about how to display your port numbers, see the The dspwasinst script topic. For more information about the WebSphere Application Server administrative console, see the The administrative console topic.

Create a JDBC provider

JDBC providers are used by the installed applications to access data from databases. Follow these steps to create a JDBC provider from the administrative console:

  1. Start the administrative console.
  2. In the topology tree, expand Resources and click JDBC Providers.
  3. On the JDBC Providers page, specify Server as the scope of the resource. Click Apply.
  4. Click New.
  5. In the JDBC Providers field, select the appropriate Native driver for your OS/400 release level.

    Note: Do not select the Native-XA driver. An XA driver is not needed by the HitCount application and may introduce some performance overhead.

  6. Click Apply.
  7. Optionally, you can specify a description, classpath, and native library path.
  8. Click Apply or OK.
  9. Click Save on the toolbar to save the configuration.
  10. Click Save again to update the master repository with your changes.

Configure a data source

After you create a JDBC provider, you need to configure a data source for the provider. Data source is used by the application to access the data from the database. It is created under a JDBC provider, which provides the specific JDBC driver implementation class. To configure a data source, follow these steps:

  1. On the JDBC Providers page of the administrative console, click the name of the JDBC provider for which you want to configure a data source.
  2. On the next page, click Data Sources.
  3. On the Data Sources page, click New.
  4. Specify jdbc/HitCount in the JNDI name field. You can also specify several optional properties on this page.
  5. Check Container managed persistence to use this Data Source in container managed persistence (CMP).
  6. Click Apply.
  7. Click Custom properties.
  8. Click databaseName.
  9. In the Value field, specify *LOCAL/HITCOUNTDB.
  10. Click Apply.
  11. Save the administrative configuration.
  12. Restart your application server.

    • Enter the Start Qshell (STRQSH) command on an OS/400 command line.
    • On the Qshell command line, enter this command:
      cd /QIBM/ProdData/WebAS5/Base/bin
    • On the Qshell command line, enter this command:
      stopServer -instance basicconfig
    • Once the instance has ended, start it again by entering this command:
      startServer -instance basicconfig

Continue Next: Set up security (optional)