| | |
| | | import com.vci.common.util.IceProxyUtility; |
| | | //import com.vci.corba.auth2.Auth2ServicePrx; |
| | | 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.framework.method.VolumeManagerPrx; |
| | | 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.ObjectPrx; |
| | | import com.vci.client.mw.ClientProxyUtility; |
| | | |
| | | public class ServiceProvider { |
| | |
| | | FrameworkServicePrx service = getInstance().getFrameServiceImpl(); |
| | | if (service == null) { |
| | | String error = "获取 Frame Service 服务异常"; |
| | | System.out.println(error); |
| | | } |
| | | |
| | | return service; |
| | | } |
| | | |
| | | /** |
| | | * 获取系统该框架服务代理 |
| | | * @return |
| | | */ |
| | | public static LogServicePrx getLogService() { |
| | | LogServicePrx service = getInstance().getLogServiceImpl(); |
| | | if (service == null) { |
| | | String error = "获取 Log Service 服务异常"; |
| | | System.out.println(error); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 获取工作流服务代理 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static WorkflowServicePrx getWFService() { |
| | | WorkflowServicePrx service = getInstance().getWFServiceImpl(); |
| | | if (service == null) { |
| | | String error = "获取 WorkflowService 服务异常"; |
| | | System.out.println(error); |
| | | //throw new Exception(error); |
| | | } |
| | | |
| | | return service; |
| | |
| | | InitIceUtil(); |
| | | } |
| | | |
| | | _frameService = FrameworkServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.FRAMESERVICE)); |
| | | ObjectPrx prx = _proxyUtil.getObjectByName(ServiceNames.FRAMESERVICE, ServiceNames.FRAMESERVICEREP); |
| | | |
| | | _frameService = FrameworkServicePrx.checkedCast(prx); |
| | | } catch (Exception e) { |
| | | //e.printStackTrace(); |
| | | |
| | | ServerWithLog4j.logger.error(e); |
| | | } |
| | | return _frameService; |
| | | } |
| | | |
| | | private LogServicePrx _logService = null; |
| | | private LogServicePrx getLogServiceImpl() { |
| | | try { |
| | | if(_logService != null){ |
| | | return _logService; |
| | | } |
| | | |
| | | if (_proxyUtil == null) { |
| | | InitIceUtil(); |
| | | } |
| | | |
| | | ObjectPrx prx = _proxyUtil.getObjectByName(ServiceNames.LOGSERVICE, ServiceNames.LOGSERVICEREP); |
| | | |
| | | _logService = LogServicePrx.checkedCast(prx); |
| | | } catch (Exception e) { |
| | | |
| | | ServerWithLog4j.logger.error(e); |
| | | } |
| | | return _logService; |
| | | } |
| | | |
| | | |
| | |
| | | InitIceUtil(); |
| | | } |
| | | |
| | | _bofService = BOFactoryServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.BOFSERVICE)); |
| | | _bofService = BOFactoryServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.BOFSERVICE, ServiceNames.BOFSERVICEREP)); |
| | | } catch (Exception e) { |
| | | //e.printStackTrace(); |
| | | ServerWithLog4j.logger.error(e); |
| | |
| | | InitIceUtil(); |
| | | } |
| | | |
| | | _oqService = ObjectQueryServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.OQSERVICE)); |
| | | _oqService = ObjectQueryServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.OQSERVICE, ServiceNames.OQSERVICEREP)); |
| | | } catch (Exception e) { |
| | | //e.printStackTrace(); |
| | | ServerWithLog4j.logger.error(e); |
| | |
| | | InitIceUtil(); |
| | | } |
| | | |
| | | _uiService = PortalServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.UISERVICE)); |
| | | _uiService = PortalServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.UISERVICE, ServiceNames.UISERVICEREP)); |
| | | } catch (Exception e) { |
| | | //e.printStackTrace(); |
| | | ServerWithLog4j.logger.error(e); |
| | |
| | | InitIceUtil(); |
| | | } |
| | | |
| | | _omdService = OMDServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.OMDSERVICE)); |
| | | _omdService = OMDServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.OMDSERVICE, ServiceNames.OMDSERVICEREP)); |
| | | } catch (Exception e) { |
| | | //e.printStackTrace(); |
| | | ServerWithLog4j.logger.error(e); |
| | |
| | | InitIceUtil(); |
| | | } |
| | | |
| | | _wfService = WorkflowServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.WFSERVICE)); |
| | | _wfService = WorkflowServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.WFSERVICE, ServiceNames.WFSERVICEREP)); |
| | | } catch (Exception e) { |
| | | //e.printStackTrace(); |
| | | ServerWithLog4j.logger.error(e); |
| | |
| | | InitIceUtil(); |
| | | } |
| | | |
| | | _defaultVolService = VolumeServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.VOLUMESERVICE)); |
| | | _defaultVolService = VolumeServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.VOLUMESERVICE, ServiceNames.VOLUMESERVICEREP)); |
| | | } catch (Exception e) { |
| | | //e.printStackTrace(); |
| | | ServerWithLog4j.logger.error(e); |