Hitachi

uCosminexus Application Server Command Reference Guide


cjrarupdate (update resource adapter version)

Organization of this page

Format

For updating the resource adapter version
cjrarupdate -type {dbconnector|rar} [-force] [-f file-path ...]
      [-backupto backup-storage-destination-directory]
For restoring the work directory environment
cjrarupdate -recoverfrom backup-RAR-directory

Function

For updating the resource adapter version

This command updates the version of resource adapter imported or deployed on Cosminexus Component Container.

The conversion of resource adapter requires unused space that is at least twice# the disk usage space required for the work directory. Moreover, during upgrade installation, before you execute this command, you must use the conversion command cjenvupdate for checking that the conversion processing was completed without any problems.

The work-directory is the directory specified by the ejb.public.directory key in usrconf.cfg (option definition file for J2EE server).

#

The amount of required unused disk space depends on the number of resource adapters to be converted and the number of executions of the command. For the disk space required for conversion, you confirm the Application Server migration procedure. For the Application Server migration, see 10. Migrating from Application Server of Earlier Versions (In the J2EE Server Mode) in the uCosminexus Application Server Maintenance and Migration Guide.

For recovering the work directory environment

If an attempt to update the version of resource adapter imported or deployed on Cosminexus Component Container fails, this command recovers the work directory environment.

Arguments

-type {dbconnector|rar}

Specifies the type of resource adapter to be upgraded:

  • dbconnector

    DB Connector.

  • rar

    Resource adapter that is supported by Cosminexus Component Container; however, is not the DB Connector.

-force

Forcibly upgrades the version. When this argument is specified, the version of the resource adapter is upgraded regardless of the current version of the resource adapter.

-f file-path
  • When a resource adapter other than the DB Connector is specified as the conversion target (when -type rar is specified)

    Specifies the file path of the resource adapter that replaces the existing old version resource adapter. Although multiple file paths can be specified, the -f option cannot be specified more than once.

    If a resource adapter conforming to the Connector 1.5 specifications other than TP1 inbound adapter or FTP inbound adapter is specified in the -f option, the message KDJE42356-E is displayed.

  • When a DB Connector is specified as the conversion target (when -type dbconnector is specified)

    This argument is ignored.

-backupto backup-storage-destination-directory

Specifies the storage destination of the work directory backup. If this option is omitted, the backup directory is created in work-directory.

You specify this option when the disk containing the work directory does not have enough unused space or when the backup cannot be created because of a path length limitation associated with the file system. When you use this option to specify the backup storage destination directory, you should note the following items:

  • To execute the cjrarupdate command multiple times, you specify the same directory.

  • Backup creation might fail if a long path name is specified. If this happens, delete the failed backup and re-execute the command with a shorter path name specified.

  • Specify a directory that does not include the installation directory of Cosminexus Component Container.

-recoverfrom backup-RAR-directory

Specifies the backup RAR directory for the work directory that becomes the recovery source.

Post-conversion operations

Once conversion has been completed, a backup work directory is created directly under the work directory of each J2EE server or the directory specified by the -backupto option. The work directory stores the post-conversion information (files), and the backup work directory stores the pre-conversion information (files). If the name of the work directory is ...\directory-name\ or .../directory-name/, the name of the backup work directory becomes ...\directory-name\rarupdate_bk\ or .../directory-name/rarupdate_bk/.# After conversion, you should perform a startup check of the resource adapter, a termination check of the resource adapter, and a check of the resource adapter's connection with the database. After the checks have been completed, you can delete the backup work directory if the pre-conversion work directory information (files) is no longer required. However, it is recommended that you save the backup work directory to another location.

#

The backup target directory is related to the resource adapter.

If a backup work directory already exists, ...\directory-name\rarupdate_bk\ or .../directory-name/rarupdate_bk/ is renamed to ...\directory-name\rarupdate_bk_?\ or .../directory-name/rarupdate_bk_?/ (? is the command's execution date/time to the millisecond).

Procedure for comparing the version tags

Conversion processing might not terminate normally because the system is unable to evaluate the version tag for a RAR file to be converted.

To compare version tags:

  1. Obtain the version character string from the <version> tag of the ra.xml containing the RAR file or the ra.xml of the resource adapter that was imported or deployed to the J2EE server.

  2. If the version character string is specified in the following format, edit it to a format that can be compared:

    sequential-number-1.sequential-number-2character-string-beginning-with-a-non-numeric-character

    Format that can be compared

    V1V2-R1R2-S1S2 (or V1V2-R1R2)

    V1, V2, R1, R2: Number from 0 to 9

    S1: /

    S2: Upper-case alphabetic character (A to Z)

    The editing procedure is as follows:

    • Add a single-byte hyphen (-) between sequential-number-1 and sequential-number-2.

      sequential-number-1-sequential-number-2character-string-beginning-with-a-non-numeric-character

    • If sequential-number-1 is 9 or less, add a leading 0.

    • If sequential-number-2 is 9 or less, add a trailing 0.

    Editing examples

    1.0 01-00

    1.1 01-10

    1.12 01-12

    2.0 02-00

If the version character strings are specified in the format V1V2-R1R2[-S1S2], use the following procedure to compare the versions:

If the value of the <version> tag of ra.xml is an unsupported character string, the versions cannot be compared correctly, and the following actions become necessary:

Input examples

When multiple file paths are specified in the -f option
cjrarupdate -type rar -f file1 file2 file3

Return values

0:

The command terminated normally.

1:

The command terminated abnormally.

Notes