Setting up a connection pool as a resource makes it available to managed beans using resource injection. It is an easy 3 step process performed from the GlassFish admin console.
First expand the "JDBC" node on the left side of the GlassFish admin console. Then click on the "JDBC Resources" node. This puts a "JDBC Resources" pane on the right side. Step 2 is performed there.
In the "JDBC Resources" pane click on the "New" button.
Fill in information in the "New JDBC Resource" pane. For the "JNDI Name:" field you can use any name you want as long as it has the "jdbc/" prefix. Remember this name. It will be used in managed beans that need to reference the resource.
For the "Pool Name:" field, select the name that you gave the pool from the drop down list. Then click on the "OK" button.
When you have finished with the last step you should see a pane similar to the one below. The JNDI name for your resource should appear in the "JNDI Name" column.
When you use a resource in JSF managed beans, you will inject it with a @Resource(name="jndi-name") annotation, where jndi-name should be the JNDI name of the resource.