Integrate Trifon's change from trunk revision 5795
BugFix: [ 1939524 ] Bad context for cache of po objects on server https://sourceforge.net/tracker/index.php?func=detail&aid=1939524&group_id=176962&atid=879332
This commit is contained in:
parent
5c4d6def6f
commit
7eb915047a
|
@ -52,11 +52,13 @@ public class MTable extends X_AD_Table
|
|||
{
|
||||
Integer key = new Integer (AD_Table_ID);
|
||||
MTable retValue = (MTable) s_cache.get (key);
|
||||
if (retValue != null)
|
||||
if (retValue != null && retValue.getCtx() == ctx) {
|
||||
return retValue;
|
||||
}
|
||||
retValue = new MTable (ctx, AD_Table_ID, null);
|
||||
if (retValue.get_ID () != 0)
|
||||
if (retValue.get_ID () != 0) {
|
||||
s_cache.put (key, retValue);
|
||||
}
|
||||
return retValue;
|
||||
} // get
|
||||
|
||||
|
@ -74,9 +76,13 @@ public class MTable extends X_AD_Table
|
|||
while (it.hasNext())
|
||||
{
|
||||
MTable retValue = (MTable)it.next();
|
||||
if (tableName.equalsIgnoreCase(retValue.getTableName()))
|
||||
if (tableName.equalsIgnoreCase(retValue.getTableName())
|
||||
&& retValue.getCtx() == ctx
|
||||
)
|
||||
{
|
||||
return retValue;
|
||||
}
|
||||
}
|
||||
//
|
||||
MTable retValue = null;
|
||||
String sql = "SELECT * FROM AD_Table WHERE UPPER(TableName)=?";
|
||||
|
|
Loading…
Reference in New Issue