From 393655c8b307914da76e7f1b0e5c77944b6b90cd Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 10 Aug 2015 12:24:02 -0500 Subject: [PATCH] IDEMPIERE-2756 Background threads losing context when user log out / found issue when cached objects have lost their context but are still returned from cache (failing case second run of any ModelRunProcess web service) --- org.adempiere.base/src/org/compiere/model/PO.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.adempiere.base/src/org/compiere/model/PO.java b/org.adempiere.base/src/org/compiere/model/PO.java index 430dd1fd48..95e3ed0e14 100644 --- a/org.adempiere.base/src/org/compiere/model/PO.java +++ b/org.adempiere.base/src/org/compiere/model/PO.java @@ -425,6 +425,8 @@ public abstract class PO */ public Properties getCtx() { + if (p_ctx.size() == 0 && Env.getCtx().size() > 0) + p_ctx = Env.getCtx(); return p_ctx; } // getCtx