Fighting with Composer. NLS data

Case: I played with locale data in composer, installed project a couple of times and now I want to perform “clean” installation without reinstalling the whole repository. The problem is: in composer locale data is hierarchical but in repository it is flat, for example, if I overwrote attribute’s label for subtype and now I want to inherit it from supertype again, I need to keep overwritten label in sync with supertype – seems not to be convenient.

Solution:

-- deleting NLS data for particular types
DELETE dmi_object_type
 WHERE r_object_id IN (SELECT r_object_id
                         FROM dm_nls_dd_info_s
                        WHERE parent_id IN (SELECT r_object_id
                                              FROM dm_aggr_domain_s
                                             WHERE type_name ...));

DELETE dm_nls_dd_info_r
 WHERE r_object_id IN (SELECT r_object_id
                         FROM dm_nls_dd_info_s
                        WHERE parent_id IN (SELECT r_object_id
                                              FROM dm_aggr_domain_s
                                             WHERE type_name ...));

DELETE dm_nls_dd_info_s
 WHERE parent_id IN (SELECT r_object_id
                       FROM dm_aggr_domain_s
                      WHERE type_name ...);

UPDATE dm_domain_r
   SET nls_dd_info = NULL, nls_key = NULL
 WHERE     r_object_id IN (SELECT r_object_id
                             FROM dm_aggr_domain_s
                            WHERE type_name ...)
       AND nls_dd_info IS NOT NULL;

UPDATE dm_domain_r
   SET nls_dd_info = NULL, nls_key = NULL
 WHERE     r_object_id IN (SELECT r_object_id
                             FROM dm_domain_s
                            WHERE parent_id IN (SELECT r_object_id
                                                  FROM dm_aggr_domain_s
                                                 WHERE type_name ...))
       AND nls_dd_info IS NOT NULL;

-- generating API commands to remove dd objects
SELECT 'apply,c,,REMOVE_DD_OBJECT,ID,S,' || r_object_id
  FROM dmi_dd_type_info_sp
 WHERE type_name ...;

SELECT 'apply,c,,REMOVE_DD_OBJECT,ID,S,' || r_object_id
  FROM dmi_dd_attr_info_sp
 WHERE type_name ...;

CTS challenge

Previously I had written that CTS has some serious security issues, but this knowledge I got when I was trying to install xCP2 about a year ago, so I didn’t pay much attention to CTS functionality, unfortunately, on last month I was involved in project which was supposed to use real-time requests to CTS and I got following changes:

  1. Reference composer project is completely unusable (looks like I’m the first person who tried to use it), the problem is following: if try to load reference project into composer, composer does not recognise it as reference project and fails to build it (transformation project contains types with names starting from dmc_ prefix): , it could be fixed by adding “com.emc.ide.project.dmCoreProjectNatureId” line into .project file, unfortunately it does not help because further dar deployer fails to resolve dependencies
  2. SBO API does not work in JMS context due to Jar hell, the default installation of dmc_jars and dmc_libraries is:
    API> ?,c,select r_object_id, sandbox_library, object_name from dmc_java_library 
      where FOLDER('/System/Modules/SBO/com.documentum.services.cts.df.transform.ICTSTransformService',DESCEND)
    r_object_id       sandbox_library  object_name                                                                                                                                                                  
    ----------------  ---------------  -----------
    0b024be9800138ab                0  RealTime
    0b024be9800138ae                0  log4j
    (2 rows affected)
    
    
    API>  ?,c,select r_object_id, jar_type, object_name from dmc_jar 
      where FOLDER('/System/Modules/SBO/com.documentum.services.cts.df.transform.ICTSTransformService',DESCEND)
    r_object_id       jar_type      object_name                                                                                                                                                                     
    ----------------  ------------  ---------------------------
    09024be9800138ba             1  ctsTransform.jar
    09024be9800138df             2  ctsTransformImpl.jar
    09024be9800138b2             2  commons-codec-1.3.jar
    09024be9800138b3             2  commons-fileupload-1.0.jar
    09024be9800138b4             2  commons-httpclient-3.0.jar
    09024be9800138b5             2  commons-io-1.2.jar
    09024be9800138b6             2  commons-jxpath-1.2.jar
    09024be9800138b7             2  commons-lang-2.4.jar
    09024be9800138b8             2  commons-logging.jar
    09024be9800138e3             2  loadbalancer.jar
    09024be9800138e5             3  realtime.jar
    09024be9800138e6             2  commons-cli-1.0.jar
    09024be9800138e4             2  log4j.jar
    (13 rows affected)
    

    the correct one is:

    API> ?,c,select r_object_id, sandbox_library, object_name from dmc_java_library 
      where FOLDER('/System/Modules/SBO/com.documentum.services.cts.df.transform.ICTSTransformService',DESCEND)
    r_object_id       sandbox_library  object_name                                                                                                                                                                  
    ----------------  ---------------  -----------
    0b024be98001baa4                1  RealTime
    0b024be98001baa7                0  log4j
    (2 rows affected)
    
    
    API> ?,c,select r_object_id, jar_type, object_name from dmc_jar 
       where FOLDER('/System/Modules/SBO/com.documentum.services.cts.df.transform.ICTSTransformService',DESCEND)
    r_object_id       jar_type      object_name                                                                                                                                                                     
    ----------------  ------------  --------------------------
    09024be98001bab0             1  ctsTransform.jar
    09024be98001bac3             2  ctsTransformImpl.jar
    09024be98001b9c2             2  commons-codec-1.3.jar
    09024be98001b9c3             2  commons-fileupload-1.0.jar
    09024be98001baaa             2  commons-httpclient-3.0.jar
    09024be98001baab             2  commons-io-1.2.jar
    09024be98001baac             2  commons-jxpath-1.2.jar
    09024be98001baad             2  commons-lang-2.4.jar
    09024be98001bac7             2  loadbalancer.jar
    09024be98001bac9             2  realtime.jar
    09024be98001bad4             2  commons-cli-1.0.jar
    09024be98001bac8             2  log4j.jar
    (12 rows affected)