Documentum 5.3连接

时间:2009-01-26 14:32:09

标签: java documentum

我是Documentum的新手。我正在创建一个独立的Java应用程序,需要连接到documentum实例(5.3)。我将如何连接到实例?

2 个答案:

答案 0 :(得分:7)

您必须在客户端计算机上安装和配置Documentum Foundation Classes(Documentum API),在类路径中的任何位置复制dfc.jar,最后阅读大量文档: - )

答案 1 :(得分:4)

首先你的dmcl.ini文件必须包含以下行

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

然后以下代码应该适合你

        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);
            }
        }