Hitachi

Hitachi Application Server V10 Command Reference Guide (For Windows® Systems)


2.20.20 ping-connection-pool

Tests a connection pool to determine if it is usable.

Synopsis

asadmin [asadmin-options] ping-connection-pool [--help]
    [--appname application [--modulename module]]
    [--target target] pool_name

Storage location

Application Server installation directory/javaee/glassfish/bin

Function

The ping-connection-pool subcommand of asadmin tests if an existing JDBC or connector connection pool is usable. The ping-connection-pool command can target resources that are scoped to a specific application or module, as defined in the glassfish-resources.xml for Java EE Server domain. This subcommand is supported in remote mode only.

The jndi-name for application-scoped-resources or module-scoped-resources is specified using the format java:app/jdbc/myDataSource or java:module/jdbc/myModuleLevelDataSource. This naming scope is defined in the Java EE 6 Specification.

Precondition

Files

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 Java EE Server domain.

Arguments

--help | -?

Displays the help text for the subcommand.

--appname application

Specifies the name of the application in which the application scoped resource is defined. To reference the jndi-name for an application scoped resource, perform the lookup using the java:app prefix.

Type: String

The following values can be specified:

  • Name of the application

Default value: N/A

--modulename module

Specifies the name of the module in which the module scoped resource is defined. To reference the jndi-name for a module scoped resource, perform the lookup using the java:module prefix.

Type: String

The following values can be specified:

  • Name of the module

Default value: N/A

--target target

Specifies the target of this subcommand.

When you create a server instance and then specify the name of the server instance that has never been started, the command is run successfully.

The target specified by the target option does not depend on the pool name specified by the parameter.

Type: String

The following values can be specified:

  • server

    Sets a DAS as the target. server is the name of the DAS.

  • instance-name

    Sets the server instance of the specified name as the target.

Default value: server

pool_name

Specifies the name of the connection pool to be tested.

Type: String

The following values can be specified:

  • Name of the connection pool

Default value: N/A

Examples

The following example tests to see if the connection pool named DerbyPool is usable on server instance instance1.

asadmin ping-connection-pool --target instance1 DerbyPool

Exit Status

Exit Status

Explanation

0

subcommand executed successfully.

1

error in executing the subcommand.