Hitachi

uCosminexus Application Server Command Reference Guide


cjclearpool (delete connection in connection pool)

Organization of this page

Format

For specified data sources (JDBC)
cjclearpool [server-name] [-nameserver provider-URL]
      [-type jdbc] [-mode {normal|plan}]
      -resname data-source-display-name
      [-resname data-source-display-name ...]
For specified resource adapters (deploy and use as the J2EE resource adapter)
cjclearpool [server-name] [-nameserver provider-URL]
      -type connector [-mode {normal|plan}]
      -resname resource-adapter-display-name
      [-resname resource-adapter-display-name ...]
For resource adapter (include and use in the J2EE application)
cjclearpool [server-name] [-nameserver provider-URL]
      -type connector [-mode {normal|plan]
      -name application-name
      -resname resource-adapter-display-name
      [-resname resource-adapter-display-name ...]
For all data sources (JDBC) and resource adapters
cjclearpool [server-name] [-nameserver provider-URL]
      [-mode {normal|plan}] -resall

Function

This command clears the connection of a specified data source (JDBC) or resource adapter. This command can delete the connections of multiple data sources (JDBC) or multiple resource adapters concurrently.

Arguments

server-name

Specifies the name of the connected J2EE server. If the server name is omitted, the host name is assumed.

-nameserver provider-URL

Specifies the access protocol for the CORBA Naming Service, the name of the host running the CORBA Naming Service, and the port number being used by the host. These items are specified in the following format:

protocol-name: : host-name: port-number

For details on the specification items, see 2.1.2 Provider URL.

-type {jdbc|connector}

Specifies the type of connection pool. If this argument is omitted, jdbc is assumed.

  • jdbc: JDBC pool

  • connector: Resource adapter pool

-mode {normal|plan}

Specifies the type of clear operation for the connection being used. All unused connections are cleared. If this argument is omitted, normal is assumed.

  • normal (normal mode)

    A connection being used by the user is moved outside the pool and is cleared from the pool. However, the connection with the database cannot be reused.

  • plan (plan mode)

    A connection being used by the user is not cleared. However, the connection cannot be reused.

-name application-name

Specifies the name of the application that is deploying the resource adapter.

This argument can be specified when the connection pool type is connector. When this argument is omitted, the connection of any resource adapter that was deployed as a J2EE resource adapter is deleted.

-resname data-source-display-name or resource-adapter-display-name

Specifies the display name of a data source (JDBC) or resource adapter that is to be cleared.

The method of specifying the resource adapter display name differs for each resource adapter version:

  • For Connector 1.0

    Resource-adapter-display-name

  • For Connector 1.5

    Resource-adapter-display-name!Connection-definition-identifier

-resall

Specifies that all data sources (JDBC) and resource adapters are to be deleted.

This argument cannot be specified together with -type, -name, or -resname.

Input examples

For a data source (JDBC) (normal mode)
cjclearpool MyServer -resname JdbcConnection
For a resource adapter (deploy and use as a J2EE resource adapter)
cjclearpool MyServer -type connector -mode plan -resname RarConnection
For a resource adapter (include and use in the J2EE application)
cjclearpool MyServer -type connector -mode plan -name App1 -resname RarConnection
For all data sources (JDBC) and resource adapters (plan mode)
cjclearpool MyServer -mode plan -resall

Return values

0:

The command terminated normally.

1:

The command terminated abnormally.

2:

The command could not be executed because of an exclusion error.

3:

A timeout occurred.

9:

The command could not be executed because there are no administrator privileges (in Windows).

Notes