Sun GlassFish Enterprise Server v3 Administration Guide

ProcedureTo Contact (Ping) a Connection Pool

Use the ping-connection-pool subcommand in remote mode to test if a connection pool is usable. For example, if you create a new JDBC connection pool for an application that is expected to be deployed later, you can test the JDBC pool with this subcommand before the application is deployed. Running a ping will force the creation of the pool if it hasn't already been created.

Before You Begin

Before you can contact a connection pool, the connection pool must be created with authentication, and the server or database must be running.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Ping a connection pool by using the ping-connection-pool(1) subcommand.

Example 14–5 Contacting a Connection Pool

This example tests to see if the DerbyPool connection pool is usable.

asadmin> ping-connection-pool DerbyPool
Command ping-connection-pool executed successfully

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help ping-connection-pool at the command line.