Hello Experts,
I want to create a session for more than one docbase. The dfc documentation says that if you want to create a session for more than one docbase with the same credentials you can use this, sMgr.setIdentity( * , loginInfoObj ); . But, what if I want to pass different credentials. Unfortunately, there are no any information on this. Therefore, I do something like this. Create two login info objects and pass it to each docbase accordingly, or create a session with first docbase and then update the login info obj and create a session for the second one.
IDfClient client=new DfClient(); IDfClientX clientX=new DfClientX(); IDfLoginInfo loginInfo=clientX.getLoginInfo(); IDfSessionManager sessionManeger=client.newSessionManager(); IDfSession peerSession; //Create session in first docbase loginInfo.setUser("dmadmin"); loginInfo.setPassword("pass1"); loginInfo.setDomain(null); sessionManeger.setIdentity("REPOSITORY1", loginInfo); peerSession=sessionManeger.newSession("REPOSITORY1"); //Create session in second docbase loginInfo.setUser("dmadmin"); loginInfo.setPassword("pass2"); loginInfo.setDomain(null); sessionManeger.setIdentity("REPOSITORY2", loginInfo); peerSession=sessionManeger.getSession("REPOSITORY2");This works pretty fine. I can query data from both docbases, do some operation etc. Now the question is, is this a proper way of creating a session for more than one docbase with different credentials? Is this how it should be? If not please let me know how it should be.
Any documentation, guide, and etc. would be great, if there are any.
Thanks in advance