From 18c43123b51a1688ab4ae01fe3d171c7d92e619b Mon Sep 17 00:00:00 2001 From: wangting <wangting@vci-tech.com> Date: 星期四, 16 一月 2025 18:19:34 +0800 Subject: [PATCH] 1、调整会话过期提示 2、流程设计器隐藏拓展按钮,隐藏右下角图标 --- Source/Common/PLTCommon/src/com/vci/common/util/IceProxyUtility.java | 47 +++++++++++++++++++++++++++++++++++++---------- 1 files changed, 37 insertions(+), 10 deletions(-) diff --git a/Source/Common/PLTCommon/src/com/vci/common/util/IceProxyUtility.java b/Source/Common/PLTCommon/src/com/vci/common/util/IceProxyUtility.java index 5d84bb4..58a16a5 100644 --- a/Source/Common/PLTCommon/src/com/vci/common/util/IceProxyUtility.java +++ b/Source/Common/PLTCommon/src/com/vci/common/util/IceProxyUtility.java @@ -3,9 +3,12 @@ import java.util.HashMap; import java.util.Map; +import org.apache.commons.lang3.StringUtils; + import com.vci.common.log.ServerWithLog4j; import com.vci.common.resource.IceClientProperties; import com.zeroc.Ice.ObjectPrx; +import com.zeroc.Ice.Util; /** * <p>Title: </p> @@ -18,6 +21,8 @@ */ public abstract class IceProxyUtility { + private static final String locatorKey = "--Ice.Default.Locator"; + private com.zeroc.Ice.Communicator _communicator = null; protected IceProxyUtility() { @@ -33,13 +38,20 @@ { try { - _communicator = com.zeroc.Ice.Util.initialize(args); - _communicator.getDefaultRouter(); + String[] initParams = new String[0]; + if (IceClientProperties.Endpoints().contains("/")) + initParams = new String[]{locatorKey + "=" + IceClientProperties.Endpoints()}; + + _communicator = Util.initialize(initParams); + + //_communicator = com.zeroc.Ice.Util.initialize(args); + //_communicator.getDefaultRouter(); } catch (Exception e) { ServerWithLog4j.logger.error("InitCommunicator Error", e); throw e; } } + /** * 鑾峰彇鏈嶅姟瀵硅薄浠g悊 @@ -47,25 +59,40 @@ * @return * @throws Exception */ - public ObjectPrx getObjectByName(String name) throws Exception + public ObjectPrx getObjectByName(String name, String adapterRep) throws Exception { + ObjectPrx prx = null; try { - String proxyLocator = name + ":" + IceClientProperties.Endpoints(); - - ObjectPrx prx = _communicator.stringToProxy(proxyLocator); - Map<String, String> context = getCurUserContext(); - if (context != null) { - return prx.ice_context(context); + String proxyLocator = name; + if (!IceClientProperties.Endpoints().contains("/")) { + proxyLocator = name + ":" + IceClientProperties.Endpoints(); } else { - return prx; + proxyLocator = name + "@" + adapterRep; } + + prx = _communicator.stringToProxy(proxyLocator); + } catch (Exception e) { e.printStackTrace(); throw e; } + + String[] ids = prx.ice_ids(); + + if (prx == null) + throw new Exception("Not Found ObjectPrx " + name); + + Map<String, String> context = getCurUserContext(); + if (context != null) { + return prx.ice_context(context); + } else { + return prx; + } } + + /** * 鑾峰彇鏈嶅姟瀵硅薄浠g悊锛屽苟璁剧疆context淇℃伅 * @param name -- Gitblit v1.9.3