Skip Ribbon Commands
Skip to main content
Getting DFC Session and releasing back to pool

IDfClientX clientx = new DfClientX();
IDfClient client = clientx.getLocalClient();

//create a Session Manager object
IDfSessionManager sMgr = client.newSessionManager();

//create an IDfLoginInfo object for user creddentials
IDfLoginInfo loginInfoObj = clientx.getLoginInfo();
loginInfoObj.setUser(<user>);
loginInfoObj.setPassword(<pass>);
loginInfoObj.setDomain(null);

//bind the Session Manager to the login info
sMgr.setIdentity(<docbase>, loginInfoObj);
IDfSession session = null;

try {
//get the IDFsession instance by using getSession or newSession
Session = sMgr.getSession(<docbase>);
//user the session to perform repository functions
……….
……….
}finally{
//release the session
sMgr.release(session);
}

Get new Session instead of existing from the session pool

We can get a new session from the repository by using IDfSessionManager’s newSession method instead of getSession method.

Turning Off Connection Pooling
We can turn of connection pooling so that every time a session is requested, a new repository session is created by setting the connect_pooling_enabled’ property in the dmcl.ini/dfc.properties file to ‘F’

Maximum no. of sessions for all clients in the repository

By default maximum concurrent sessions on the server are limited to 100. To change
this, modify the concurrent_sessions key in the server.ini file. The server needs to be started
for this to take affect.

Enabling Session diagnostics
We can enable session diagnostics by adding ‘dfc.resources.diagnostics.enabled=true’ to the dfc.properties file and possibly directing the logs to a separate file by configuring an appender for session diagnostics as described in the session diagnostics section.