Configuring the ID Resolver

Configuring the ID Resolver involves changing two property files: DB2ConnectionCustomizer.properties and IDResolveKeys.properties. The DB2ConnectionCustomizer.properties file describes how the ID Resolver handles timestamps, 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.

To configure the ID Resolver:

  1. Follow the step appropriate to your platform:
    • Extract the DB2ConnectionCustomizer.properties file in the IdResGen.zip file, located in the following directory:

      Rename the extracted file and place it in a directory that is in the classpath.

      Important: Do not remove or modify the existing DB2ConnectionCustomizer.properties file.

    • i5/OSiSeries Copy the ISeries_RESWCSID_Customizer.properties file from the following directory:

      /QIBM/ProdData/Commerce56/properties
      to a directory that is in the classpath , rename the new file but keep the .properties extension. Make the necessary changes to this new file.

      Important: Do not remove or modify the original ISeries_RESWCSID_Customizer.properties file.

  2. Increase the Java Virtual Machine (JVM) heap size:
  3. By default, the maximum amount of memory allocated to the JVM heap is 64 MB. If this is not increased, the JVM can eventually run out of memory during the load process. The maximum amount of memory 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. For example, if you require to modify the JVM heap size for the ID Resolver, then do the following:
    1. Open the idresgen utility located in:
    2. Change the JVM heap size to 1024 MB as shown in the following example:
      %JAVA_HOME%\bin\java -Xms1024M -Xmx1024M -classpath %CP% %idResolver% %* > %log%
      
  4. Change how the ID Resolver handles database drivers

    The following lines in the ID Resolver customizer property file specify the default values for database drivers:

    DBVendorName = DB2
    DBDriverName = COM.ibm.db2.jdbc.app.DB2Driver
    DBURL = jdbc:db2:
    

    where:

    DBVendorName
    The database type. The options are: DB2/iSeries, DB2 and Oracle.
    DBDriverName
    The JDBC driver name.
    • i5/OSiSeriescom.ibm.db2.jdbc.app.DB2Driver
    • DB2 COM.ibm.db2.jdbc.app.DB2Driver
    • Oracleoracle.jdbc.driver.OracleDriver
    DBURL
    The URL to access the database.
    • i5/OSiSeriesjdbc:db2://
    • DB2 jdbc:db2:
    • Oracle jdbc:oracle:oci8:@
  5. Change timestamp masks
    1. Add or change timestamp masks.

      The following default input-timestamp masks are provided:

      InputTimeStampFormat.1 = yyyy-DD hh:mm:ss.SSSSSS
        InputTimeStampFormat.2 = yyyy-MM-dd hh:mm:ss.SSSSSS
        InputTimeStampFormat.3 = yyyy-DD-hh.mm.ss.SSSSSS
        InputTimeStampFormat.4 = yyyy-MM-dd-HH.mm.ss.SSSSSS
        InputTimeStampFormat.5 = yyyy-MM-dd-hh.mm.ss.SSSSSS
        InputTimeStampFormat.6 = yyyy-MM-dd HH:mm:ss.SSSSSS
        InputTimeStampFormat.7 = yyyy-DD HH:mm:ss.SSSSSS
      

      Use the next number, for example, the next input-timestamp mask would be InputTimeStampFormat.8.

    2. Specify the output timestamp format, microsecond mask, and database-specific format by modifying the values of the following attributes:
      TargetTimeStampFormat
      For example, yyyy-MM-dd HH:mm:ss.SSSSSS
      MicroSecondMask
      For example, SSSSSS
      DatabaseSpecificFormat
      For example, YYYY-MM-DD HH24:MI:SS
    3. Change how the ID Resolver handles storage
      1. Specify how the ID Resolver handles persistent storage, by setting a value for PersistentStorageType:
        0
        The ID Resolver operates in the "normal" manner (where the symbol hashmaps exist in memory).
        1
        Database using the existing connection that the ID Resolver is using (Stores the symbols in the connected database).
        2
        Database using the new connection (Creates a new connection and stores the symbols in the database).

        Note: The previous implementation of persistent storage using JDBM and NDBM is not applicable to this release.

      2. Specify the number of records stored in memory, by setting a value for MemoryStorageSize:
        1
        indicates that only one record is kept in memory.
        -1
        All records are kept in memory. In this case, the ID Resolver reverts to its "normal" behavior.
  6. Create a foreign relationship using the REFKEYS table

    The REFKEYS table is created to represent a foreign relationship between tables that does not already 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 defined and the identifiers have to be resolved as a foreign key, then do the following:

    Create a REFKEYS table as shown in the following example DDL:
      CREATE TABLE "REFKEYS" (
                   "FKTABLE_NAME"    CHAR(18)   NOT NULL ,
                   "FKCOLUMN_NAME"   CHAR(18)   NOT NULL ,
                   "TABLENAME"       CHAR(18)   NOT NULL 
      );
    

    where:

    FKTABLE_NAME
    is the foreign (or "child") table name
    FKCOLUMN_NAME
    is the foreign column name
    TABLENAME
    is the primary (or "parent") table name
  7. Create an entry in the REFKEYS table that describes the required foreign relationship.

    Change the IdResolveKeys.properties, or create a new properties file based on the IDResolveKeys.properties file. The file is located in the following directory:

    i5/OSiSeriesTo change IdResolveKeys.properties, copy it from the directory, save it to the WC_userdir/instances/instance_name/xml directory, then make any necessary changes to the new file.

Note: The above directory is in the classpath used by the idResGen.sh script. The values that you set in this file depend on whether you need to generate identifiers, generate cascaded primary keys, or generate compound keys an example is provided for each type:

Feedback