After the wizard is complete, you can click the link Manage Database Connections to view the data connection properties as Figure 5 indicates.

Now you've successfully set up a database connection. Next, let's take a look how the application works with the database connection we've defined. The following is the piece of Java code to use JNDI and connection ID to get a specific connection, then execute the SQL statements and return result set.

Performance Tuning

For a better performance, you can either use DB connection pool technology to reuse connection, or use Prepared Statement cache to reuse preparations. The database connection performance tuning is managed by the function Web Performance Advisor defined in IBM Web Administration for i GUI.

To see how it works, launch your Web Administration for i again, click the link Web Performance Advisor in the left navigation panel, select the integrated Application server and then click on the Manage Attributes button. The Database Connections tab is the starting point for updating database property values. To work with the performance attributes for a specific database connection, click on the Database Connection ID value. This is a link to the Manage database connection attributes page, as indicated in Figure 6. For example, you can click on the Advise button for a recommended maximum connection pool.

Winning Combination

The IBM integrated Web application server for i, built on an infrastructure that leverages OSGi and Eclipse, provides a secure and easy to configure environment for hosting Web applications while requiring minimal system resources. IBM Web Administration for i provides an easy way for managing the server, installing and managing the applications, and managing other resources such as database connections are provided. If you're looking for these benefits, then the IBM integrated Web application server and its Web Administration interface are a winning combination.

IBM Systems Magazine is a trademark of International Business Machines Corporation. The editorial content of IBM Systems Magazine is placed on this website by MSP TechMedia under license from International Business Machines Corporation.