From 0f73aafcb17dd20f05449d17bfcb0a84c6829a6f Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 25 Aug 2017 12:50:52 +0800 Subject: [PATCH 1/6] =?UTF-8?q?DEC-8=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E9=87=8A=E6=94=BE=E6=8C=81=E6=9C=89=E7=9A=84?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E7=8E=AF=E5=A2=83=E7=9A=84=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 05e023135..7df9da924 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -574,7 +574,8 @@ public class RemoteEnv extends AbstractEnv { clock.stop(); // richer:把轮训使用的定时器也去掉 timer.cancel(); - + // 当前环境可能用了远程环境的缓存目录,释放一下 + CacheManager.getProviderInstance().setCacheDirectory(null); HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "r_sign_out"); From 08ba12c27d148a138d89cf56e9faac704cb038a8 Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 25 Aug 2017 14:52:24 +0800 Subject: [PATCH 2/6] =?UTF-8?q?DEC-8=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E5=B9=B2=E6=B6=89=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 7df9da924..ee76793ea 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -574,8 +574,6 @@ public class RemoteEnv extends AbstractEnv { clock.stop(); // richer:把轮训使用的定时器也去掉 timer.cancel(); - // 当前环境可能用了远程环境的缓存目录,释放一下 - CacheManager.getProviderInstance().setCacheDirectory(null); HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "r_sign_out"); @@ -2283,4 +2281,9 @@ public class RemoteEnv extends AbstractEnv { return StringUtils.EMPTY; } } + + @Override + public boolean isRemoteEnv() { + return true; + } } \ No newline at end of file From 0f52b449e8bc6bb9921eba48f4b675ae5cb0c81a Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 25 Aug 2017 15:40:12 +0800 Subject: [PATCH 3/6] =?UTF-8?q?DEC-8=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E5=B9=B2=E6=B6=89=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/start/Designer.java | 7 ++++++- designer_base/src/com/fr/env/RemoteEnv.java | 6 +----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/start/Designer.java b/designer/src/com/fr/start/Designer.java index 09b7fa76e..9c4569183 100644 --- a/designer/src/com/fr/start/Designer.java +++ b/designer/src/com/fr/start/Designer.java @@ -1,6 +1,7 @@ package com.fr.start; import com.fr.base.BaseUtils; +import com.fr.base.Env; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.actions.core.ActionFactory; @@ -30,6 +31,7 @@ import com.fr.design.menu.ShortCut; import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignerModule; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.env.RemoteEnv; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.stable.ProductConstants; @@ -432,7 +434,10 @@ public class Designer extends BaseDesigner { InformationCollector collector = InformationCollector.getInstance(); collector.collectStopTime(); collector.saveXMLFile(); - ServletContext.fireServletStopListener(); + Env currentEnv = FRContext.getCurrentEnv(); + if (!(currentEnv instanceof RemoteEnv)) {//远程环境不需要触发stop + ServletContext.fireServletStopListener(); + } } } \ No newline at end of file diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index ee76793ea..05e023135 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -574,6 +574,7 @@ public class RemoteEnv extends AbstractEnv { clock.stop(); // richer:把轮训使用的定时器也去掉 timer.cancel(); + HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "r_sign_out"); @@ -2281,9 +2282,4 @@ public class RemoteEnv extends AbstractEnv { return StringUtils.EMPTY; } } - - @Override - public boolean isRemoteEnv() { - return true; - } } \ No newline at end of file From 2d315acc6f18593f09e67a283f59c253ac0fcfba Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 25 Aug 2017 16:02:23 +0800 Subject: [PATCH 4/6] =?UTF-8?q?DEC-8=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E5=B9=B2=E6=B6=89=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/start/Designer.java | 3 +-- designer_base/src/com/fr/env/RemoteEnv.java | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/start/Designer.java b/designer/src/com/fr/start/Designer.java index 9c4569183..e8aa73f89 100644 --- a/designer/src/com/fr/start/Designer.java +++ b/designer/src/com/fr/start/Designer.java @@ -31,7 +31,6 @@ import com.fr.design.menu.ShortCut; import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignerModule; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.env.RemoteEnv; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.stable.ProductConstants; @@ -435,7 +434,7 @@ public class Designer extends BaseDesigner { collector.collectStopTime(); collector.saveXMLFile(); Env currentEnv = FRContext.getCurrentEnv(); - if (!(currentEnv instanceof RemoteEnv)) {//远程环境不需要触发stop + if (!currentEnv.isRemoteEnv()) {//远程环境不需要触发stop ServletContext.fireServletStopListener(); } } diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 05e023135..440efed9f 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -2282,4 +2282,9 @@ public class RemoteEnv extends AbstractEnv { return StringUtils.EMPTY; } } + + @Override + public boolean isRemoteEnv() { + return true; + } } \ No newline at end of file From b48b354e0e9e9000f1b5ac75be8960e34a343042 Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 25 Aug 2017 16:17:52 +0800 Subject: [PATCH 5/6] =?UTF-8?q?DEC-8=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E5=B9=B2=E6=B6=89=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/start/Designer.java | 5 +---- designer_base/src/com/fr/env/RemoteEnv.java | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/start/Designer.java b/designer/src/com/fr/start/Designer.java index e8aa73f89..8fa1b5e6a 100644 --- a/designer/src/com/fr/start/Designer.java +++ b/designer/src/com/fr/start/Designer.java @@ -36,7 +36,6 @@ import com.fr.general.Inter; import com.fr.stable.ProductConstants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; -import com.fr.stable.web.ServletContext; import com.fr.stable.xml.XMLTools; import javax.swing.*; @@ -434,9 +433,7 @@ public class Designer extends BaseDesigner { collector.collectStopTime(); collector.saveXMLFile(); Env currentEnv = FRContext.getCurrentEnv(); - if (!currentEnv.isRemoteEnv()) {//远程环境不需要触发stop - ServletContext.fireServletStopListener(); - } + currentEnv.envQuit(); } } \ No newline at end of file diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 440efed9f..afacea95d 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -2284,7 +2284,7 @@ public class RemoteEnv extends AbstractEnv { } @Override - public boolean isRemoteEnv() { - return true; + public void envQuit() { + } } \ No newline at end of file From 325d8b188c0d3093ff0560711e692fd64129779c Mon Sep 17 00:00:00 2001 From: zack Date: Mon, 28 Aug 2017 14:38:28 +0800 Subject: [PATCH 6/6] =?UTF-8?q?DEC-8=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E8=AF=AF=E5=88=A0=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/start/Designer.java | 2 +- designer_base/src/com/fr/env/RemoteEnv.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/start/Designer.java b/designer/src/com/fr/start/Designer.java index 8fa1b5e6a..526df8f09 100644 --- a/designer/src/com/fr/start/Designer.java +++ b/designer/src/com/fr/start/Designer.java @@ -433,7 +433,7 @@ public class Designer extends BaseDesigner { collector.collectStopTime(); collector.saveXMLFile(); Env currentEnv = FRContext.getCurrentEnv(); - currentEnv.envQuit(); + currentEnv.doWhenServerShutDown(); } } \ No newline at end of file diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index afacea95d..3c25fc7ff 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -2284,7 +2284,7 @@ public class RemoteEnv extends AbstractEnv { } @Override - public void envQuit() { + public void doWhenServerShutDown() { } } \ No newline at end of file