Deprecated feature: Configuring the idresgen utility

Configuring the idresgen utility involves changing two property files: DB2ConnectionCustomizer.properties, and IDResolveKeys.properties. The DB2ConnectionCustomizer.properties file describes how the idresgen utility handles time stamps, storage, and database drivers. The IDResolveKeys.properties file specifies which columns of a primary entry should be used as lookups for tables that require the identifier of a primary row.

Procedure

  1. Increase the Java virtual machine (JVM) heap size that is used for the idresgen utility.

    By default, the maximum amount of memory that is allocated to the JVM heap is 64 MB. If this heap size is not increased, the JVM can eventually run out of memory during the ID resolving process. The maximum amount of memory that is allocated to the Java heap can be varied by using the JVM -mx option in the Java command. If you are loading files that are more than 500 MB, then increase the JVM heap size to 512 MB or 1024 MB.

    1. Go to the directory that contains the idresgen utility command file and open the file in text editor:
      • LinuxAIXWC_installdir/bin/idresgen.sh
      • WindowsWC_installdir\bin\idresgen.cmd
      • WebSphere Commerce DeveloperWCDE_installdir\bin\idresgen.bat
    2. Change the JVM heap size to 1024 MB by specifying the -Xms and -Xmx options of the Java command:
      • If the -Xms and -Xmx parameters are already specified in the file, change the values to the heap size that you want. Ensure that you update all occurrences of -Xms and -Xmx.
      • If the -Xms and -Xmx parameters are not specified in the file, change all occurrences of %JAVA_HOME%\bin\java in the utility command file to %JAVA_HOME%\bin\java -Xms1024M -Xmx1024M.
    3. Save your changes.
  2. Optional: Change the directory for the idresgen utility error log. By default, the idresgen utility writes the error log to the following directory:
    • WebSphere Commerce DeveloperLinuxAIXWindowsThe directory where the input file resides.
    • For IBM i OS operating systemWC_userdir/instances/ instance_name/logs
    1. Go to the directory that contains the idresgen utility command file and open the file in text editor:
      • LinuxAIXFor IBM i OS operating systemWC_installdir/bin/idresgen.sh
      • WindowsWC_installdir\bin\idresgen.cmd
      • WebSphere Commerce DeveloperWCDE_installdir\bin\idresgen.bat
    2. Change error report location setting:
      • If the -Dcom.ibm.wcm.ErrorReporterDir parameter is already specified in the file, change the directory to the new location for the idresgen utility error log. Ensure that you update all occurrences of -Dcom.ibm.wcm.ErrorReporterDir.
      • If the -Dcom.ibm.wcm.ErrorReporterDir parameter is not specified in the file, change all occurrences of %JAVA_HOME%\bin\java %PM_ARGS% in the utility command file to %JAVA_HOME%\bin\java %PM_ARGS% -Dcom.ibm.wcm.ErrorReporterDir= error_log_directory.

      Important: The directory that you specify must exist. The idresgen utility does not create the directory for you. If the specified directory does not exist, no error log file is produced. Additionally, if message logging is configured for the idresgen utility, a DirNotExististException message is logged in the message log

    3. Save your changes.
  3. Update the IdResolveKeys.properties file to define how keys are generated as the data is resolved. The file is in the following directory:
    • WC_installdir/properties
    • WebSphere Commerce DeveloperWC_installdir\properties

    The values that you set in the IdResolveKeys.properties file depend on whether you must generate identifiers, generate cascaded primary keys, or generate compound keys.

    An example is provided for each type:

  4. DB2 Change how the idresgen utility handled cursors by editing the DB2ConnectionCustomizer.properties file. This file is in IdResGen.zip compressed file in the following directory.
    • WC_installdir/lib/loader/
    • WCDE_installdir\workspace\wc\lib\loader\

    WebSphere Commerce DeveloperWhen you use the idresgen utility that is provided with WebSphere Commerce Developer this step is optional.

    The following lines in the ID Resolver customizer property file specify how the idresgen utility handles cursors:
    SpecifyCursorHold = yes
    CursorHold = false
    
    Where:
    Parameter Parameter setting
    SpecifyCursorHold Specifies whether to hold the cursor across transactions. The default value is SpecifyCursorHold = no
    CursorHold If this property is set to true (CusorHold = true), cursors are not closed when a transaction is committed or rolled back. All resources that are acquired during the unit of work are held. Locks on specific rows and objects that are implicitly acquired during the unit of work, however, are released.
  5. Oracle The idresgen utility must be using the thick client during instance creation and the migration process. The bootstrap data gets processed during these processes.

    By default, the idresgen utility uses the Oracle thick JDBC client. To change the idresgen utility to use the Oracle thin JDBC client:

    1. Open WC_installdir/properties/OracleConnectionCustomizer.properties in a text editor.
    2. Locate the following text: DBURL = jdbc:oracle:oci8:@
      Note: By default, the OracleConnectionCustomizer.properties file does not contain this text string. When the setdbtype utility script runs to switch the database type to an Oracle database, this file is replaced. The file is replaced with a version that contains the property information for Oracle databases.
    3. Change the text to match the following text: DBURL = jdbc:oracle:thin:@
    4. Save your changes.
  6. Create an entry in the REFKEYS table that describes the required foreign relationship.
    The REFKEYS table is created to represent a foreign relationship between tables that does not exist in the database. Generally, the database schema describes the foreign relationship by creating a foreign key declaration that links a column of a table to another table. If the database schema does not have a foreign relationship that is defined and the identifiers have to be resolved as a foreign key, create a REFKEYS table. Create the table that is based on the following SQL:
    
      CREATE TABLE "REFKEYS" (
                   "FKTABLE_NAME"    CHAR(18)   NOT NULL ,
                   "FKCOLUMN_NAME"   CHAR(18)   NOT NULL ,
                   "TABLENAME"       CHAR(18)   NOT NULL 
      );
    
    Where:
    FKTABLE_NAME
    The foreign (or "child") table name
    FKCOLUMN_NAME
    The foreign column name
    TABLENAME
    The primary (or "parent") table name