Which one is the best to use?
Unfortunately we are experiencing session leak while executing our workflow. Below is how we get the session:
IDfSession sessionObj =
null;
// Connect to docbase with given credentials
try { IDfClient client = DfClient.getLocalClient();
DfLoginInfo loginInfo =
new DfLoginInfo();
m_sessionMgr = client.newSessionManager();
loginInfo.setUser(strDocUser);
loginInfo.setPassword(strPasswd);
m_sessionMgr.setIdentity(strDocbase, loginInfo);
sess =
m_sessionMgr.getSession(m_docbase);
I find they use session.disconnect() everywhere. But I guess as we use newSessionManager(), there should be someway to nullify the session manager and SessionMgr.release(session) does that.This is the code written 3 years back. I see the code release() were commented everywhere and disconnect() was used instead. But no documentation, so cant say why disconnect() was preferred.Are there are any side effects using release() ?Please advice...I find they use session.disconnect() everywhere. But I guess as we use newSessionManager(), there should be someway to nullify the session manager and SessionMgr.release(session) does that.This is the code written 3 years back. I see the code release() were commented everywhere and disconnect() was used instead. But no documentation, so cant say why disconnect() was preferred.Are there are any side effects using release() ?Please advice...I find they use session.disconnect() everywhere. But I guess as we use newSessionManager(), there should be someway to nullify the session manager and SessionMgr.release(session) does that.This is the code written 3 years back. I see the code release() were commented everywhere and disconnect() was used instead. But no documentation, so cant say why disconnect() was preferred.Are there are any side effects using release() ?Please advice...System details:
Dctm 6.5 SP1
Jboss 4.2
Jdk 1.5