views:

482

answers:

2

Hi,

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?

+4  A: 

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
+1  A: 

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