| | |
| | | import com.vci.common.resource.IceClientProperties; |
| | | import com.vci.corba.common.VCIError; |
| | | import com.vci.corba.bofactory.BOFactoryServicePrx; |
| | | import com.vci.corba.framework.method.FrameworkServicePrx; |
| | | import com.vci.corba.framework.FrameworkServicePrx; |
| | | import com.vci.corba.log.LogServicePrx; |
| | | import com.vci.corba.omd.OMDServicePrx; |
| | | import com.vci.corba.portal.PortalServicePrx; |
| | | import com.vci.corba.query.ObjectQueryServicePrx; |
| | | import com.vci.corba.volume.VolumeServicePrx; |
| | | import com.vci.corba.workflow.method.WorkflowServicePrx; |
| | | import com.vci.corba.workflow.WorkflowServicePrx; |
| | | import com.zeroc.Ice.Communicator; |
| | | import com.zeroc.Ice.Current; |
| | | import com.zeroc.Ice.ObjectPrx; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取系统该框架服务代理 |
| | | * @return |
| | | */ |
| | | public static LogServicePrx getLogService(Current current) { |
| | | try { |
| | | ObjectPrx prx = getObjectByName(current.adapter.getCommunicator(), ServiceNames.LOGSERVICE); |
| | | |
| | | LogServicePrx prxTemp = LogServicePrx.uncheckedCast(prx); |
| | | return prxTemp.ice_context(current.ctx); |
| | | } catch (Exception e) { |
| | | //e.printStackTrace(); |
| | | ServerWithLog4j.logger.error(e); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 获取系统该框架服务代理 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static LogServicePrx getLogService() throws VCIError { |
| | | try { |
| | | Current current = threadLocal.get(); |
| | | if (current == null) |
| | | throw new VCIError("ServerServiceProvider-0001", new String[] {"获取当前上下文失败!"}); |
| | | |
| | | ObjectPrx prx = getObjectByName(current.adapter.getCommunicator(), ServiceNames.LOGSERVICE); |
| | | |
| | | LogServicePrx prxTemp = LogServicePrx.uncheckedCast(prx); |
| | | return prxTemp.ice_context(current.ctx); |
| | | } catch (VCIError e) { |
| | | //e.printStackTrace(); |
| | | ServerWithLog4j.logger.error(e); |
| | | throw e; |
| | | } |
| | | } |
| | | /** |
| | | * 获取系统授权认证框架服务代理 |
| | | * @return |
| | | */ |