blob: 6dae88b0f865ae2a8d3b0ffaa10f2cef2fa2fd5b [file] [log] [blame]
type=page
status=published
title=ping-connection-pool
next=ping-node-dcom.html
prev=osgi-shell.html
~~~~~~
= ping-connection-pool
[[ping-connection-pool-1]][[GSRFM00214]][[ping-connection-pool]]
== ping-connection-pool
Tests if a connection pool is usable
[[sthref1926]]
=== Synopsis
[source]
----
asadmin [asadmin-options] ping-connection-pool [--help]
pool_name
[--appname application [--modulename module]
----
[[sthref1927]]
=== Description
The `ping-connection-pool` subcommand tests if an existing JDBC or
connector connection pool is usable . For example, if you create a new
JDBC connection pool for an application that is expected to be deployed
later, the JDBC pool is tested with this subcommand before deploying the
application.
Before testing availability of a connection pool, you must create the
connection pool with authentication and ensure that the server or
database is started.
This subcommand is supported in remote mode only.
Application Scoped Resources
The `ping-connection-pool` subcommand can target resources that are
scoped to a specific application or module, as defined in the
`glassfish-resources.xml` for the GlassFish domain.
* To reference the `jndi-name` for an application scoped resource,
perform the lookup using the `java:app` prefix.
* To reference the `jndi-name` for a module scoped resource, perform the
lookup using the `java:module` prefix.
The `jndi-name` for application-scoped-resources or
module-scoped-resources are specified using the format
``java:app/``jdbc/myDataSource or
``java:module/``jdbc/myModuleLevelDataSource.
This naming scope is defined in the Jakarta EE 6 Specification
(`http://download.oracle.com/javaee/6/api/`).
[[sthref1928]]
=== Options
asadmin-options::
Options for the `asadmin` utility. For information about these
options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
Displays the help text for the subcommand.
`--appname`::
Name of the application in which the application scoped resource is
defined.
`--modulename`::
Name of the module in which the module scoped resource is defined.
[[sthref1929]]
=== Operands
pool_name::
Name of the connection pool to be reinitialized.
[[sthref1930]]
=== Examples
[[GSRFM727]][[sthref1931]]
==== Example 1   Contacting a Connection Pool
This example tests to see if the connection pool named `DerbyPool` is
usable.
[source]
----
asadmin> ping-connection-pool DerbyPool
Command ping-connection-pool executed successfully
----
[[sthref1932]]
=== Exit Status
0::
subcommand executed successfully
1::
error in executing the subcommand
[[sthref1933]]
=== See Also
link:asadmin.html#asadmin-1m[`asadmin`(1M)]
link:create-connector-connection-pool.html#create-connector-connection-pool-1[`create-connector-connection-pool`(1)],
link:create-jdbc-connection-pool.html#create-jdbc-connection-pool-1[`create-jdbc-connection-pool`(1)],
link:delete-connector-connection-pool.html#delete-connector-connection-pool-1[`delete-connector-connection-pool`(1)],
link:delete-jdbc-connection-pool.html#delete-jdbc-connection-pool-1[`delete-jdbc-connection-pool`(1)],
link:list-connector-connection-pools.html#list-connector-connection-pools-1[`list-connector-connection-pools`(1)],
link:list-jdbc-connection-pools.html#list-jdbc-connection-pools-1[`list-jdbc-connection-pools`(1)]