JavaBlog.fr / Java.lu DEVELOPMENT,DFC DCTM,Documentum Documentum : Diagnostic DFC configuration, localization log4j.propeties, dfc.properties

Documentum : Diagnostic DFC configuration, localization log4j.propeties, dfc.properties

Hello,

CLIENT SIDE
Everybody has already been confronted with problem of localization of log4j.properties or dfc.properties files used on runtime. The DFC configuration files like log4j.properties and dfc.properties are located through the classpath found in WAR files and EAR files. More, for information, there are several possibilities to point to dfc.properties file:

  • Include Statement
    A dfc.properties can contain an include statement pointing at the external configuration:
    #include d:/projects/javalu/config/dfc.properties:

    It is also possible to use hybrid approaches by including several files and/or appending/overwriting the parameters in application’s dfc.properties:
    #include d:/projects/javalu/config/common/dfc.properties
    #include d:/projects/javalu/config/specific/dfc.properties # may or may not override
    # may or may not override

     
  • Set the system property in code
    // Set dfc.properties file
    System.setProperty("dfc.properties.file","d:/projects/javalu/config/dfc.properties");
    
    // Create client object
    IDfClient client = DfClient.getLocalClient(); // new DfClient();
    // ...
    

     

  • Set the system property in the command line (or in VM arguments in IDE Eclipse)
    C:\>java -classpath "..." –Ddfc.properties.file=d:/projects/javalu/config/dfc.properties ...
    

     

  • Set the system property in Application Server Configuration
    For Tomcat, the configuration file is catalina.bat:

    ...
    rem ============= ADD MEMORY
    SET JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -XX:MaxPermSize=128m
    ...
    rem ============= SET DFC DIAGNOSTIC
    SET JAVA_OPTS=%JAVA_OPTS% –Ddfc.properties.file=d:/projects/javalu/config/dfc.properties 
    

     

So, there is a simple way to find out what configuration files are used in DFC CLIENT application : set Java system property dfc.diagnose_config to true in order to print out the file paths of log4j, dfc, and dbor configuration files to the standard output stream like the following:

Reading DFC configuration from "file:/D:/Documentum/config/dfc.properties"
Reading log4j configuration from "file:/D:/Documentum/config/log4j.properties"
Reading dbor configuration from "file:/D:/Documentum/config/dbor.properties" 

or

Reading DFC configuration from "file:/opt/dctm/product/7.1/dfc_shared/config/dfc.properties"
Reading log4j configuration from "file://opt/dctm/product/7.1/dfc_shared/config/log4j.properties"
Reading dbor configuration from "file://opt/dctm/product/7.1/dfc_shared/config/dbor.properties" 

 
There are several ways to set the Java system property:

  • Set the system property in code
    // Set the diagnostic mode
    System.setProperty("dfc.diagnose_config","true");
    
    // Create client object
    IDfClient client = DfClient.getLocalClient(); // new DfClient();
    // ...
    

     

  • Set the system property in the command line (or in VM arguments in IDE Eclipse)
    This system property must be added to the command line of during DFC invocation:

    C:\>java -classpath "..." -Ddfc.diagnose_config=true 
    

     

  • Set the system property in Application Server Configuration
    For Tomcat, this file is catalina.bat:

    ...
    rem ============= ADD MEMORY
    SET JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -XX:MaxPermSize=128m
    ...
    rem ============= SET DFC DIAGNOSTIC
    SET JAVA_OPTS=%JAVA_OPTS% -Ddfc.diagnose_config=true 
    

     

 
 
SERVER SIDE
On server side, there is also dfc.properties for example in Java Server Method (JMS):

  • UNIX : /opt/dctm/product/7.1/dfc_shared/jboss7.1.1/server/
    DctmServer_MethodServer/deployments/ServerApps.ear/APP-INF/classes
  • WINDOWS : D:\Documentum\jboss7.1.1\server\
    DctmServer_MethodServer\deployments\ServerApps.ear\APP-INF\classes


 
…this dfc.properties contains an include statement pointing at the external configuration:
#include /opt/dctm/product/7.1/dfc_shared/config/dfc.properties

 
… the pointed dfc.properties in /opt/dctm/product/7.1/dfc_shared/config/dfc.properties contains the parameters:

dfc.data.dir=/opt/dctm/product/7.1/dfc_shared
dfc.tokenstorage.dir=/opt/dctm/product/7.1/dfc_shared/apptoken
dfc.tokenstorage.enable=false
dfc.session.secure_connect_default=try_native_first


dfc.docbroker.host[0]=hosta
dfc.docbroker.port[0]=1489
dfc.docbroker.host[1]=hostb
dfc.docbroker.port[1]=1489
dfc.docbroker.host[2]=hostc
dfc.docbroker.port[2]=1489
dfc.docbroker.host[3]=hostd
dfc.docbroker.port[3]=1489

dfc.globalregistry.repository=GLOBALR
dfc.globalregistry.username=dm_bof_registry
dfc.globalregistry.password=13x.....A\=\=

dfc.docbroker.search_order=random

 
 

That’s all!!!

Huseyin OZVEREN

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

Related Post