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,12 +471,26 @@ public class CompiereService {
|
||||||
);
|
);
|
||||||
if (m_connected && expired)
|
if (m_connected && expired)
|
||||||
{
|
{
|
||||||
|
synchronized (csMap) {
|
||||||
|
String key = getKey(m_AD_Client_ID,
|
||||||
|
m_AD_Org_ID,
|
||||||
|
m_userName,
|
||||||
|
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);
|
if (log.isLoggable(Level.INFO)) log.info("Closing expired/invalid " + this);
|
||||||
Env.logout();
|
Env.logout();
|
||||||
ServerContext.dispose();
|
ServerContext.dispose();
|
||||||
m_loggedin = false;
|
m_loggedin = false;
|
||||||
m_connected = false;
|
m_connected = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return expired;
|
return expired;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue