Log in to the GlassFish Admin Console.
In the left navigation panel, expand Resources and JDBC, and then select Connection Pools.
Click New.
The New JDBC Connection Pool page appears.
Do the following:
Scroll down to the Additional Properties table, and then do the following:
Click Finish.
The connection pool is created.
Click the connection pool that you just created.
The Edit Connection Pool page appears.
Click Ping.
The Admin Console attempts to connect to the database. If the connection does not succeed, check to see whether the database is running and verify the database connectivity properties, such as the URL string.