Modifying the configuration settings of the Java virtualization agent

You can modify the registration.xml file of the Java virtualization agent to change the server address, log level, and other settings.

About this task

The registration.xml file in JavaAgent.zip package that is provided with HCL® Quality Server contains configuration settings for the Java virtualization agent.

Procedure

  1. Download and extract the Java Virtualization Agent package that is provided with HCL® Quality Server. For more information, see HCL OneTest API tool packages.
  2. From the extracted JavaAgent package, open the registration.xml file using a text editor.
  3. Edit the configuration settings as shown in the following table:
    Table 1. Java virtualization agent configuration settings
    Configurable setting Description

    server base-url = "https://Host name or IP address selected during installation of HCL® Quality Server>:5443/RTCP" security-token="" />

    By default, an HCL® Quality Server installation listens for the registration of HCL OneTest API proxies and agents on port 5443.

    If your HCL® Quality Server installation is using a different port number, enter the number in the server URL setting. This port number can also be configured when you are using Installation Manager to install the HCL® Quality Server.
    Note: If you do not specify a HCL® Quality Server URL, you will not be able to monitor the Java virtualization agent.

    Set the security-token value if you want to use domain-level security for the proxy. For more information about security-tokens, see Configuring agents and proxies to use security tokens.

    ssl The SSL connection details that you want to use to connect to the server. The SSL element is optional. If the ssl element is not included, then the proxy uses the Java keystore location and password that is found in the system properties javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword. If these properties are not set, then the proxy trusts all server certificates.
    trustAll
    If set to true, this attribute tells the proxy to trust all certificates that are presented by the server. In this case, the trustStore, trustStoreType and trustStorePassword attributes are ignored.
    trustStore
    The path to the keystore that contains the trusted certificates that are used to verify the certificate that is presented by the server. By default this attribute's value is set to the path of the greenhatTrusted.jks keystore, which is included with the HTTP/TCP proxy and contains the HCL OneTest API Root CA certificate. If the server's certificate was changed, then this value must also be changed to point to a keystore that contains a certificate that can be used to verify the new server certificate. For more information about configuring the server certificate, see Using your own truststore for server SSL connections.
    trustStoreType
    The type attribute specifies the type of the keystore. If not specified, the default value is jks.
    trustStorePassword
    The password attribute specifies the password that is used to load the keystore file. The password for the default truststore is passphrase.
    protocol
    The protocol attribute defines the SSL handshake protocol used to connect to the server.

    Default value: SSL_TLSv2, TLS.

    The specified default options are checked for availability. SSL_TLSv2 protocol is supported by the JRE and, if it is unavailable, the TLS protocol is used.

    logger level

    Options are as follows:
    • debug
    • error
    • info
    • warning

    identifier name

    This setting enables you to specify a name for this agent. This makes it easier to identify a specific agent when there are two or more agents of the same type registered with HCL® Quality Server.
    Note: By default, this setting is commented out. Therefore, to use this setting, you must first uncomment it and then edit the identifier name.

    domains

    Ordinarily, there is no need to edit the domain and environment tags. However, if HCL® Quality Server is used to set up specific business domains and environments, you might make the following changes to the setting:

    Set the name attribute of the domain tag to the domain name in the HCL OneTest API project that is being used to intercept and record Java method calls.

    Set the name attribute of the environment tag to the name of the environment that is selected in the HCL OneTest API project for recording or virtualizing Java method calls.

    statistics initial-state

    Setting the initial state to on will set the Observation level for this intercept in HCL® Quality Server to Statistics when the intercept first registers with the HCL® Quality Server.

    Setting the initial state to off will set the Observation level for this intercept in HCL® Quality Server to None when the intercept first registers with the HCL® Quality Server.
    Note: For Java virtualization intercepts, the only statistics reported are statistics for interactions that are recorded or stubbed. Statistics for general interactions are not reported.

    reporting frequency

    By default, observations are reported every 10 seconds. If you increase the reporting interval, fewer observation messages are sent over the network, but the data is not available to HCL OneTest API as frequently. The value is specified in seconds, and values between 5 and 30 are allowed.

    capture

    Set this property to on to capture credentials when you observe JMS requests.
  4. Save and close the file.

Results

If you make any changes to the registration.xml file after deploying the Java virtualization agent, you must restart the Java application into which the agent is installed. If you do not restart the application, the changes will not take effect.