IDEMPIERE-2944 Preserve iDempiere session between sucessive webservice calls / found the previous sessions was not being closed properly
This commit is contained in:
parent
4c644268e1
commit
48b927327a
|
@ -471,11 +471,25 @@ public class CompiereService {
|
||||||
);
|
);
|
||||||
if (m_connected && expired)
|
if (m_connected && expired)
|
||||||
{
|
{
|
||||||
if (log.isLoggable(Level.INFO)) log.info("Closing expired/invalid " + this);
|
synchronized (csMap) {
|
||||||
Env.logout();
|
String key = getKey(m_AD_Client_ID,
|
||||||
ServerContext.dispose();
|
m_AD_Org_ID,
|
||||||
m_loggedin = false;
|
m_userName,
|
||||||
m_connected = false;
|
m_AD_Role_ID,
|
||||||
|
m_M_Warehouse_ID,
|
||||||
|
m_locale,
|
||||||
|
m_password,
|
||||||
|
m_IPAddress);
|
||||||
|
if (ctxMap.containsKey(key)) {
|
||||||
|
Properties cachedCtx = ctxMap.get(key);
|
||||||
|
Env.getCtx().putAll(cachedCtx);
|
||||||
|
}
|
||||||
|
if (log.isLoggable(Level.INFO)) log.info("Closing expired/invalid " + this);
|
||||||
|
Env.logout();
|
||||||
|
ServerContext.dispose();
|
||||||
|
m_loggedin = false;
|
||||||
|
m_connected = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return expired;
|
return expired;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue