2

I am new to Documentum. I am creating a stand alone java application that needs to connect to a documentum instance (5.3). How would I go about connecting to the instance?

2 Answers2

7

You must install and configure Documentum Foundation Classes (Documentum API) at your client machine, copy dfc.jar at any place in your classpath and at the end read tons of documentation :-)

sourcerebels
  • 5,140
  • 1
  • 32
  • 52
4

first your dmcl.ini file must conain the following lines

[DOCBROKER_PRIMARY]
host=<host address or ip of docbroker for your docbase>
port=<port # usually 1489>

then the following code should work for you

        String docbaseName = "docbase";
        String userName = "user";
        String password = "pass";
        IDfClientX clientx = new DfClientX();
        IDfClient client = clientx.getLocalClient();

        IDfSessionManager sMgr = client.newSessionManager();
        IDfLoginInfo loginInfoObj = clientx.getLoginInfo();
        loginInfoObj.setUser(userName);
        loginInfoObj.setPassword(password);
        loginInfoObj.setDomain(null);
        sMgr.setIdentity(docbaseName, loginInfoObj);
        IDfSession session = null;
        try
        {
            session = sMgr.getSession(docbaseName);
            // do stuff here
        }
        finally
        {
            if(session != null)
            {
                sMgr.release(session);
            }
        }
shsteimer
  • 28,436
  • 30
  • 79
  • 95