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
    1// Set dfc.properties file
    2System.setProperty("dfc.properties.file","d:/projects/javalu/config/dfc.properties");
    3 
    4// Create client object
    5IDfClient client = DfClient.getLocalClient(); // new DfClient();
    6// ...

     

  • Set the system property in the command line (or in VM arguments in IDE Eclipse)
    1C:\>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:

    1...
    2rem ============= ADD MEMORY
    3SET JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -XX:MaxPermSize=128m
    4...
    5rem ============= SET DFC DIAGNOSTIC
    6SET 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:

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

or

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

 
There are several ways to set the Java system property:

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

     

  • 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:

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

     

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

    1...
    2rem ============= ADD MEMORY
    3SET JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -XX:MaxPermSize=128m
    4...
    5rem ============= SET DFC DIAGNOSTIC
    6SET 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:

01dfc.data.dir=/opt/dctm/product/7.1/dfc_shared
02dfc.tokenstorage.dir=/opt/dctm/product/7.1/dfc_shared/apptoken
03dfc.tokenstorage.enable=false
04dfc.session.secure_connect_default=try_native_first
05 
06 
07dfc.docbroker.host[0]=hosta
08dfc.docbroker.port[0]=1489
09dfc.docbroker.host[1]=hostb
10dfc.docbroker.port[1]=1489
11dfc.docbroker.host[2]=hostc
12dfc.docbroker.port[2]=1489
13dfc.docbroker.host[3]=hostd
14dfc.docbroker.port[3]=1489
15 
16dfc.globalregistry.repository=GLOBALR
17dfc.globalregistry.username=dm_bof_registry
18dfc.globalregistry.password=13x.....A\=\=
19 
20dfc.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