IDEMPIERE-2756 Background threads losing context when user log out
This commit is contained in:
parent
ad6290e09c
commit
b1c16a2441
|
@ -66,13 +66,10 @@ public class LoggedSessionListener implements HttpSessionListener, ServletContex
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeADSession(String sessionID, String serverName) {
|
public void removeADSession(String sessionID, String serverName) {
|
||||||
String whereClause = "WebSession=? AND ServerName=? AND Processed='N'";
|
String sql = "UPDATE AD_Session SET Processed='Y' WHERE WebSession=? AND ServerName=? AND Processed='N'";
|
||||||
List<MSession> sessions = new Query(Env.getCtx(), MSession.Table_Name, whereClause, null)
|
int no = DB.executeUpdate(sql, new Object[] {sessionID, serverName}, false, null);
|
||||||
.setParameters(sessionID, serverName)
|
if (no < 0) {
|
||||||
.list();
|
throw new AdempiereException("UpdateSession: Cannot Destroy Session");
|
||||||
for (MSession session : sessions) {
|
|
||||||
session.setProcessed(true);
|
|
||||||
session.saveEx();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue