I wrote a stand alone DFC program to connect to two docbases with the same name, ID but projected to two different docbrokers. Here is how I am connecting to the docbases.
// *******************************// get session for Source Docbase// *******************************srcSession= connectToDocbase(srcDocbase, srcUser, srcPass, srcDocbroker);// *******************************// get session for Target Docbase// *******************************trgSession = connectToDocbase(trgDocbase, trgUser, trgPass, trgDocbroker);privateIDfSession connectToDocbase(String docbase, String user, String pass, String docbroker) throws DfException, Exception {try { clientX = new DfClientX(); client = clientX.getLocalClient(); if (docbroker != null && docbroker.length() > 0) { client.getClientConfig().setString("primary_host", docbroker); client.getClientConfig().setString("primary_port", "1489"); }IDfTypedObject serverMap =client.getServerMapEx(docbase, null, docbroker, "1489"); "i_host_name"); out.println("Host Name :" + hostName); IDfLoginInfo loginInfo =clientX.getLoginInfo(); loginInfo.setUser(user);loginInfo.setPassword(pass);this.sessionManager = client.newSessionManager(); if (sessionManager.hasIdentity(docbase)) { sessionManager.clearIdentity(docbase); }sessionManager.setIdentity(docbase, loginInfo); sessionManager.authenticate(docbase + "@" + hostName); catch (DfException dfEx) { out.println("Error connecting to the " + docbase " docbase. Swallowing this exception..." + dfEx + "\n Stack trace : "+dfEx.getStackTraceAsString()); }return sessionManager.newSession(docbase); }
The problem is that although it seems like it is successfully connecting to both docbases, it is really creating two sessions in the source docbase. It is not connecting to the target docbase at all.Can someone tell me why ?Here is the dfc.properties filedfc.docbroker.host[0]=aixxx1dfc.docbroker.port[0]=1489dfc.docbroker.host[1]=aix112dfc.docbroker.port[1]=1489dfc.bof.registry.repository=gfgfgfdfc.bof.registry.username=dmadmindfc.bof.registry.password=ghddf=dfc.session.max_collection_count=1000dfc.session.max_count=1000dfc.session.pool.enable=truedfc.session.reuse_limit=1000dfc.data.dir=C\:\\Documentumdfc.search.ecis.enable=falsedfc.search.ecis.host=dfc.search.ecis.port=dfc.tracing.enabled=truedfc.diagnostics.resources.enable = falsedfc.checkout.dir=C\:\\Documentum\\Checkout