You can test a JDBC connection pool for usability in one of these ways:
In the Administration Console, open the Resources component, open the JDBC component, select Connection Pools, and select the connection pool you want to test. Then select the Ping button in the top left corner of the page. For details, click the Help button in the Administration Console.
Use the asadmin ping-connection-pool command. For details, see the Oracle GlassFish Server 3.0.1 Reference Manual.
Both these commands fail and display an error message unless they successfully connect to the connection pool.
You can also specify that a connection pool is automatically tested when created or reconfigured by setting the Ping attribute to true (the default is false) in one of the following ways:
Enter a Ping value in the New JDBC Connection Pool or Edit Connection Pool page in the Administration Console. For more information, click the Help button in the Administration Console.
Specify the ----ping option in the asadmin create-jdbc-connection-pool command. For more information, see the Oracle GlassFish Server 3.0.1 Reference Manual.
Specify the ping option in the asadmin set command. For example:
asadmin set domain1.resources.jdbc-connection-pool.DerbyPool.ping=true |
For more information, see the Oracle GlassFish Server 3.0.1 Reference Manual.