Sun Java System Web Server 6.1 SP10 Getting Started Guide

ProcedureTo define the JDBC resource

Now that the JDBC connection pool definition has been created, you are ready to define a JDBC resource and associate it with the connection pool entry.

  1. Under the Java tab of the server instance, click the JDBC Resources link.

  2. Click the New button to define a new resource entry.

    Figure 7–4 Creating a JDBC Rresource

    Creating a JDBC resource

  3. Since the sun-web.xml file of the sample web application refers to the JNDI Name of the resource as "jdbc/jdbc-simple", you need to define the JDBC resource with this same JNDI name.

    Set the fields to the following values and click on the OK button to define the resource:

    Figure 7–5 JDBC Resource — General Information

    JDBC resource — general information

  4. Click on OK and Apply to save and apply your changes.

    After you’ have set up database connectivity, you are ready to deploy the jdbc-simple sample web application that uses these newly created JDBC resources. You can find this sample application at the following location:


    install_root/plugins/java/samples/webapps/jdbc/simple/jdbc-simple.war

    To deploy this sample application, follow the steps outlined in Chapter 6, Running Java Web Applications On Your Server.