documentumdocumentum-dfs

alternative to dfc.properties


We're connecting to documentum server from Java progream (using dfc.jar) to pull the documents. In order to connect to the server, it requires us to make dfc.properties available in the classpath. We already have one master properties file, so want to avoid having one more. Instead, we want to put the properties inside the other properties file and then use them while connecting to the documentum server. I could find how to use docbroker host and port from Java code, i.e. using IDfTypedObject.

IDfLoginInfo loginInfoObj = clientX.getLoginInfo();
loginInfoObj.setUser(user);
loginInfoObj.setPassword(pwd);

IDfClient client = new DfClient();

IDfTypedObject cfg = client.getClientConfig();
cfg.setString("primary_host", "myhost");
cfg.setInt("primary_port", myport);

IDfSession docbase_session = client.newSession(docbase, loginInfoObj);

Like primary_host and primary_port are being set in the code, is there a way to set through code, the following properties from dfc.properties? dfc.globalregistry.repository dfc.globalregistry.username dfc.globalregistry.password


Solution

  • Despite the fact that you need to have connection information for global registry you really don't need to have those details correct. Of course unless you want to use BOF (TBO/SBO) features.

    In your case, if you don't need it (BOFs), just leave dfc.properties in place with dummy data for global registry and continue to use code for dynamically setting docbroker connection details.