All team members will need a connection pool resource in order to use JDBC in their applications. One will be created for the Cars application for testing. When you start writing code for your project you will need to create another resource for the project application.
A connection pool is made available to a web application by defining a resource. NetBeans has a wizard that sets up most of the configuration of a connection pool resource for an application. The resource can then be accessed by JSF managed beans using resource injection to get connections. Before creating the connection pool resource you need an open NetBeans connection to the database that you are connecting to.
Start the creation of the connection pool resource by right-clicking on the project, clicking on "New" in the popup menu, and clicking on "Other" in the popup submenu as shown below. This will bring up a 6 step wizard for creating the resource. Several of the steps only require clicking on the "Next>" or "Finish" button.
After doing this you can run the application to test your connection pool resource.
The first step is to choose a file type.
This brings up the "General Attributes" pane of the wizard.
This step is used to name the resource.
This brings up the "Additional Properties" pane of the wizard.
The defaults are sufficient for this step.
This brings up the "Choose Database Connection" pane of the wizard.
This step is used to name the connection pool and choose the database connection that it uses.
This brings up the "Add Connection Pool Properties" pane of the wizard.
This step selects data types for the resource.
This brings up the "Specify Optional Properties" pane of the wizard.
The defaults are sufficient for this step.
This completes the wizard. You should now be able to run the application.