|
|
@ -3,7 +3,6 @@ package com.fr.start.module; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.OptimizeUtil; |
|
|
|
import com.fr.base.OptimizeUtil; |
|
|
|
import com.fr.concurrent.NamedThreadFactory; |
|
|
|
import com.fr.concurrent.NamedThreadFactory; |
|
|
|
import com.fr.config.dao.DaoSelector; |
|
|
|
|
|
|
|
import com.fr.config.dao.DaoSelectorFactory; |
|
|
|
import com.fr.config.dao.DaoSelectorFactory; |
|
|
|
import com.fr.decision.webservice.v10.encryption.EncryptionConstants; |
|
|
|
import com.fr.decision.webservice.v10.encryption.EncryptionConstants; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
@ -11,7 +10,6 @@ import com.fr.design.RestartHelper; |
|
|
|
import com.fr.design.dialog.TipDialog; |
|
|
|
import com.fr.design.dialog.TipDialog; |
|
|
|
import com.fr.design.env.DesignerWorkspaceInfo; |
|
|
|
import com.fr.design.env.DesignerWorkspaceInfo; |
|
|
|
import com.fr.design.env.DesignerWorkspaceType; |
|
|
|
import com.fr.design.env.DesignerWorkspaceType; |
|
|
|
import com.fr.design.fun.OemProcessor; |
|
|
|
|
|
|
|
import com.fr.design.fun.impl.GlobalListenerProviderManager; |
|
|
|
import com.fr.design.fun.impl.GlobalListenerProviderManager; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.mainframe.messagecollect.StartErrorMessageCollector; |
|
|
|
import com.fr.design.mainframe.messagecollect.StartErrorMessageCollector; |
|
|
@ -24,23 +22,17 @@ import com.fr.event.Event; |
|
|
|
import com.fr.event.Listener; |
|
|
|
import com.fr.event.Listener; |
|
|
|
import com.fr.event.Null; |
|
|
|
import com.fr.event.Null; |
|
|
|
import com.fr.exit.DesignerExiter; |
|
|
|
import com.fr.exit.DesignerExiter; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.module.Activator; |
|
|
|
import com.fr.module.Activator; |
|
|
|
import com.fr.module.extension.Prepare; |
|
|
|
|
|
|
|
import com.fr.record.analyzer.EnableMetrics; |
|
|
|
import com.fr.record.analyzer.EnableMetrics; |
|
|
|
import com.fr.record.analyzer.Metrics; |
|
|
|
import com.fr.record.analyzer.Metrics; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.BuildContext; |
|
|
|
import com.fr.stable.BuildContext; |
|
|
|
import com.fr.stable.ProductConstants; |
|
|
|
|
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.project.ProjectConstants; |
|
|
|
import com.fr.stable.project.ProjectConstants; |
|
|
|
import com.fr.start.DesignerProcessType; |
|
|
|
import com.fr.start.DesignerProcessType; |
|
|
|
import com.fr.start.ServerStarter; |
|
|
|
import com.fr.start.ServerStarter; |
|
|
|
import com.fr.start.SplashContext; |
|
|
|
|
|
|
|
import com.fr.start.SplashStrategy; |
|
|
|
|
|
|
|
import com.fr.start.common.SplashCommon; |
|
|
|
|
|
|
|
import com.fr.start.event.LazyStartupEvent; |
|
|
|
import com.fr.start.event.LazyStartupEvent; |
|
|
|
import com.fr.start.server.FineEmbedServer; |
|
|
|
import com.fr.start.server.FineEmbedServer; |
|
|
|
import com.fr.value.NotNullLazyValue; |
|
|
|
import com.fr.value.NotNullLazyValue; |
|
|
@ -66,10 +58,6 @@ public class DesignerStartup extends Activator { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void beforeAllStart() { |
|
|
|
public void beforeAllStart() { |
|
|
|
BuildContext.setBuildFilePath("/com/fr/stable/build.properties"); |
|
|
|
BuildContext.setBuildFilePath("/com/fr/stable/build.properties"); |
|
|
|
// 检查是否是-Ddebug = true 启动 并切换对应的端口以及环境配置文件
|
|
|
|
|
|
|
|
checkDebugStart(); |
|
|
|
|
|
|
|
// 都是在启动过程中读取,这边提前初始化xml配置
|
|
|
|
|
|
|
|
DesignerEnvManager.getEnvManager(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
registerDaoSelector(); |
|
|
|
registerDaoSelector(); |
|
|
|
|
|
|
|
|
|
|
@ -163,16 +151,6 @@ public class DesignerStartup extends Activator { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 在VM options里加入-Ddebug=true激活 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void checkDebugStart() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ComparatorUtils.equals("true", System.getProperty("debug"))) { |
|
|
|
|
|
|
|
setDebugEnv(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void registerDaoSelector() { |
|
|
|
private void registerDaoSelector() { |
|
|
|
// 注入设计器db cache 是否可用
|
|
|
|
// 注入设计器db cache 是否可用
|
|
|
|
DesignerWorkspaceInfo info = WorkspaceUtils.getWorkspaceInfo(); |
|
|
|
DesignerWorkspaceInfo info = WorkspaceUtils.getWorkspaceInfo(); |
|
|
@ -188,18 +166,6 @@ public class DesignerStartup extends Activator { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 端口改一下,环境配置文件改一下。便于启动两个设计器,进行对比调试 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void setDebugEnv() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DesignUtils.setPort(DesignerPort.getInstance().getDebugMessagePort()); |
|
|
|
|
|
|
|
DesignerEnvManager.setEnvFile(new File(StableUtils.pathJoin( |
|
|
|
|
|
|
|
ProductConstants.getEnvHome(), |
|
|
|
|
|
|
|
ProductConstants.APP_NAME + "Env_debug.xml" |
|
|
|
|
|
|
|
))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stop() { |
|
|
|
public void stop() { |
|
|
|
// void
|
|
|
|
// void
|
|
|
|