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
2 | System.setProperty( "dfc.properties.file" , "d:/projects/javalu/config/dfc.properties" ); |
5 | IDfClient client = DfClient.getLocalClient(); |
- Set the system property in the command line (or in VM arguments in IDE Eclipse)
1 | 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:
2 | rem ============= ADD MEMORY |
3 | SET JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -XX:MaxPermSize=128m |
5 | rem ============= SET DFC DIAGNOSTIC |
6 | 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:
1 | Reading DFC configuration from "file:/D:/Documentum/config/dfc.properties" |
2 | Reading log4j configuration from "file:/D:/Documentum/config/log4j.properties" |
3 | Reading dbor configuration from "file:/D:/Documentum/config/dbor.properties" |
or
1 | Reading 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
2 | System.setProperty( "dfc.diagnose_config" , "true" ); |
5 | IDfClient client = DfClient.getLocalClient(); |
- 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:
1 | C:\>java -classpath "..." -Ddfc.diagnose_config= true |
- Set the system property in Application Server Configuration
For Tomcat, this file is catalina.bat:
2 | rem ============= ADD MEMORY |
3 | SET JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -XX:MaxPermSize=128m |
5 | rem ============= SET DFC DIAGNOSTIC |
6 | 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:

01 | dfc.data.dir=/opt/dctm/product/7.1/dfc_shared |
02 | dfc.tokenstorage.dir=/opt/dctm/product/7.1/dfc_shared/apptoken |
03 | dfc.tokenstorage.enable= false |
04 | dfc.session.secure_connect_default=try_native_first |
07 | dfc.docbroker.host[0]=hosta |
08 | dfc.docbroker.port[0]=1489 |
09 | dfc.docbroker.host[1]=hostb |
10 | dfc.docbroker.port[1]=1489 |
11 | dfc.docbroker.host[2]=hostc |
12 | dfc.docbroker.port[2]=1489 |
13 | dfc.docbroker.host[3]=hostd |
14 | dfc.docbroker.port[3]=1489 |
16 | dfc.globalregistry.repository=GLOBALR |
17 | dfc.globalregistry.username=dm_bof_registry |
18 | dfc.globalregistry. password =13x.....A\=\= |
20 | dfc.docbroker.search_order=random |
That’s all!!!
Huseyin OZVEREN
Related