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.
Under the Java tab of the server instance, click the JDBC Resources link.
Click the New button to define a new resource entry.
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:
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.