cjtestres (execute resource connection test)

Format

For data source and mails

cjtestres [server-name] [-nameserver provider-URL]
    -type {datasource|mail}
    -resname display-name [-resname display-name ...]

For the resource adapter to be deployed and used as a J2EE resource adapter

cjtestres [server-name] [-nameserver provider-URL]
    -type rar
    -resname display-name [-resname display-name ...]

For the resource adapter to be included and used in an application

cjtestres [server-name] [-nameserver provider-URL]
    -name application-name -type rar
    -resname display-name [-resname display-name ...]

Function

This command executes a connection test on a J2EE resource adapter, mail, or data source.

If there are multiple connection definitions in a resource adapter, this command performs the connection test for all the connection definitions. The connection test is executed for all the connection definitions, even if an error occurs in one of the connection definitions.

Note that you cannot execute the connection test for Inbound resource adapters.

Arguments

server-name
Specifies the name of a 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.
-name application-name
Specifies the application name when performing the connection test for the resource adapters contained in the application.
-type {datasource|mail|rar}
Specifies the type of resource for which a connection test is to be executed:
  • datasource: Data source file
  • mail: Mail
  • rar: RAR file
-resname display-name
Specifies the display name of the data source file, mail, or RAR file for which a connection test is to be executed. This option can be specified multiple times.

Input examples

For a data source

cjtestres -type datasource -resname Myds1

For mail

cjtestres -type mail -resname Mymail1

For the resource adapter to be deployed and used as a J2EE resource adapter

cjtestres -type rar -resname Myrar1

For the resource adapter to be included and used in an application

cjtestres -name App1 -type rar -resname Myrar1

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 Server 2012, Windows Server 2008, Windows 8, Windows 7, or Windows Vista).

Notes