AgileEAS.NET SOA 中介軟體平臺5.2版本下載、配置學習(二):配置WinClient分散式執行環境

魏瓊東發表於2013-11-04

一、前言

     AgileEAS.NET SOA 中介軟體平臺是一款基於基於敏捷並行開發思想和Microsoft .Net構件(元件)開發技術而構建的一個快速開發應用平臺。用於幫助中小型軟體企業建立一條適合市場快速變化的開發團隊,以達到節省開發成本、縮短開發時間,快速適應市場變化的目的。

     AgileEAS.NET SOA中介軟體平臺提供了敏捷快速開發軟體工程的最佳實踐,通過提供大量的基礎支撐功能如IOC、ORM、SOA、分散式體系及敏捷併發開發方法所支撐的外掛開發體系,以及提供了大量的實體、資料模型設計生成工具、程式碼生成工具,用於幫助中小軟體開發商快速成長。

     AgileEAS.NET平臺充分把握目前軟體行業快速發展的新趨勢,基於敏捷並行開發、快速適應市場這樣淳樸的軟體工程實踐,採用業界廣泛使用的Microsoft .Net構件(元件)開發技術實踐了這種開發思想,幫助軟體企業實現“敏捷變化、快速適合”的目標,從而幫助軟體企業在激烈的市場競爭中贏得先機並獲得更高的回報。

二、配置分散式方式執行WinClient執行容器

     在前面的AgileEAS.NET SOA 中介軟體平臺5.2版本下載、配置學習(一):下載平臺並基於直連環境執行一文之中,為大家介紹瞭如何下載AgileEAS.NET SOA中介軟體平臺,以及如何初始化資料庫執行環境、配置以直連方式執行AgileEAS.NET SOA 中介軟體WinCleint以直接資料庫方式執行。

     本文我們將為大家講解如何以配置以”SOA服務-分散式客戶端”方向執行AgileEAS.ENT SOA中介軟體平臺WinClient容器。

三、配置SOA分散式服務端

     在配置服務端之湔我們撫運動一下下載包根目錄之中的”EAS.Publisher.exe”應用程式:

     ”EAS.Publisher.exe”控制元件臺應用程式是一個用於幫助開發人員進行分散式部署時的分發程式,其本質是將釋出包“bin\dotnet”之中的程式集複製到“SOA服務”執行的環境目錄“AppServer”下面的各級目錄,執行程式如下:

執行時自動呼叫“eas.publish.cmd”指令碼,將檔案分發到“AppServer”下面的各級目錄,其指令碼內容如下:

   1: @rem 複製到下載目錄
   2: copy @RootDirectory\bin\dotnet\AgileIM.Client.exe @RootDirectory\appserver\xclient\files\AgileIM.Client.exe /y
   3: copy @RootDirectory\bin\dotnet\AgileIM.Client.exe.config @RootDirectory\appserver\xclient\files\AgileIM.Client.exe.config /y
   4: copy @RootDirectory\bin\dotnet\AgileIM.Contracts.dll @RootDirectory\appserver\xclient\files\AgileIM.Contracts.dll /y
   5: copy @RootDirectory\bin\dotnet\AgileIM.Service.dll @RootDirectory\appserver\xclient\files\AgileIM.Service.dll /y
   6: copy @RootDirectory\bin\dotnet\AxInterop.grdesLib.dll @RootDirectory\appserver\xclient\files\AxInterop.grdesLib.dll /y
   7: copy @RootDirectory\bin\dotnet\AxInterop.grproLib.dll @RootDirectory\appserver\xclient\files\AxInterop.grproLib.dll /y
   8: copy @RootDirectory\bin\dotnet\EAS.ActiveXForm.ClientClasp.AddIn.dll @RootDirectory\appserver\xclient\files\EAS.ActiveXForm.ClientClasp.AddIn.dll /y
   9: copy @RootDirectory\bin\dotnet\EAS.BPM.Activities.dll @RootDirectory\appserver\xclient\files\EAS.BPM.Activities.dll /y
  10: copy @RootDirectory\bin\dotnet\EAS.BPM.BLL.Host.dll @RootDirectory\appserver\xclient\files\EAS.BPM.BLL.Host.dll /y
  11: copy @RootDirectory\bin\dotnet\EAS.BPM.WinUI.dll @RootDirectory\appserver\xclient\files\EAS.BPM.WinUI.dll /y
  12: copy @RootDirectory\bin\dotnet\eas.client.ini @RootDirectory\appserver\xclient\files\eas.client.ini /y
  13: copy @RootDirectory\bin\dotnet\EAS.Configure.exe @RootDirectory\appserver\xclient\files\EAS.Configure.exe /y
  14: copy @RootDirectory\bin\dotnet\EAS.Configure.exe.config @RootDirectory\appserver\xclient\files\EAS.Configure.exe.config /y
  15: copy @RootDirectory\bin\dotnet\EAS.Data.Controls.dll @RootDirectory\appserver\xclient\files\EAS.Data.Controls.dll /y
  16: copy @RootDirectory\bin\dotnet\EAS.Data.dll @RootDirectory\appserver\xclient\files\EAS.Data.dll /y
  17: copy @RootDirectory\bin\dotnet\EAS.Data.Provider.dll @RootDirectory\appserver\xclient\files\EAS.Data.Provider.dll /y
  18: copy @RootDirectory\bin\dotnet\EAS.Distributed.dll @RootDirectory\appserver\xclient\files\EAS.Distributed.dll /y
  19: copy @RootDirectory\bin\dotnet\EAS.Explorer.BLL.Contracts.dll @RootDirectory\appserver\xclient\files\EAS.Explorer.BLL.Contracts.dll /y
  20: copy @RootDirectory\bin\dotnet\EAS.Explorer.BLL.Host.dll @RootDirectory\appserver\xclient\files\EAS.Explorer.BLL.Host.dll /y
  21: copy @RootDirectory\bin\dotnet\EAS.Explorer.dll @RootDirectory\appserver\xclient\files\EAS.Explorer.dll /y
  22: copy @RootDirectory\bin\dotnet\EAS.Explorer.Entities.dll @RootDirectory\appserver\xclient\files\EAS.Explorer.Entities.dll /y
  23: copy @RootDirectory\bin\dotnet\EAS.Explorer.Res.dll @RootDirectory\appserver\xclient\files\EAS.Explorer.Res.dll /y
  24: copy @RootDirectory\bin\dotnet\EAS.Explorer.WinUI.dll @RootDirectory\appserver\xclient\files\EAS.Explorer.WinUI.dll /y
  25: copy @RootDirectory\bin\dotnet\EAS.FormDesigner.exe @RootDirectory\appserver\xclient\files\EAS.FormDesigner.exe /y
  26: copy @RootDirectory\bin\dotnet\EAS.GReport.Controls.dll @RootDirectory\appserver\xclient\files\EAS.GReport.Controls.dll /y
  27: copy @RootDirectory\bin\dotnet\EAS.MicroKernel.dll @RootDirectory\appserver\xclient\files\EAS.MicroKernel.dll /y
  28: copy @RootDirectory\bin\dotnet\EAS.Monitor.dll @RootDirectory\appserver\xclient\files\EAS.Monitor.dll /y
  29: copy @RootDirectory\bin\dotnet\EAS.NLB.Monitor.exe @RootDirectory\appserver\xclient\files\EAS.NLB.Monitor.exe /y
  30: copy @RootDirectory\bin\dotnet\EAS.NLB.Server.exe @RootDirectory\appserver\xclient\files\EAS.NLB.Server.exe /y
  31: copy @RootDirectory\bin\dotnet\EAS.OrmDesigner.exe @RootDirectory\appserver\xclient\files\EAS.OrmDesigner.exe /y
  32: copy @RootDirectory\bin\dotnet\EAS.OrmDesigner.exe.config @RootDirectory\appserver\xclient\files\EAS.OrmDesigner.exe.config /y
  33: copy @RootDirectory\bin\dotnet\EAS.Report.Controls.dll @RootDirectory\appserver\xclient\files\EAS.Report.Controls.dll /y
  34: copy @RootDirectory\bin\dotnet\EAS.SmartUpdater.exe @RootDirectory\appserver\xclient\files\EAS.SmartUpdater.exe /y
  35: copy @RootDirectory\bin\dotnet\EAS.SOA.Monitor.exe @RootDirectory\appserver\xclient\files\EAS.SOA.Monitor.exe /y
  36: copy @RootDirectory\bin\dotnet\EAS.ThirdParty.Controls.dll @RootDirectory\appserver\xclient\files\EAS.ThirdParty.Controls.dll /y
  37: copy @RootDirectory\bin\dotnet\EAS.WinClient.dll @RootDirectory\appserver\xclient\files\EAS.WinClient.dll /y
  38: copy @RootDirectory\bin\dotnet\EAS.WinClient.Start.exe @RootDirectory\appserver\xclient\files\EAS.WinClient.Start.exe /y
  39: copy @RootDirectory\bin\dotnet\EAS.WinClient.Start.exe.config @RootDirectory\appserver\xclient\files\EAS.WinClient.Start.exe.config /y
  40: copy @RootDirectory\bin\dotnet\EAS.Windows.dll @RootDirectory\appserver\xclient\files\EAS.Windows.dll /y
  41: copy @RootDirectory\bin\dotnet\EAS.Wpf.Controls.dll @RootDirectory\appserver\xclient\files\EAS.Wpf.Controls.dll /y
  42: copy @RootDirectory\bin\dotnet\grdes50.dll @RootDirectory\appserver\xclient\files\grdes50.dll /y
  43: copy @RootDirectory\bin\dotnet\gregn50.dll @RootDirectory\appserver\xclient\files\gregn50.dll /y
  44: copy @RootDirectory\bin\dotnet\ICSharpCode.AvalonEdit.dll @RootDirectory\appserver\xclient\files\ICSharpCode.AvalonEdit.dll /y
  45: copy @RootDirectory\bin\dotnet\Interop.grdesLib.dll @RootDirectory\appserver\xclient\files\Interop.grdesLib.dll /y
  46: copy @RootDirectory\bin\dotnet\Interop.grproLib.dll @RootDirectory\appserver\xclient\files\Interop.grproLib.dll /y
  47: copy @RootDirectory\bin\dotnet\itextsharp.dll @RootDirectory\appserver\xclient\files\itextsharp.dll /y
  48: copy @RootDirectory\bin\dotnet\lua51.x64.dll @RootDirectory\appserver\xclient\files\lua51.x64.dll /y
  49: copy @RootDirectory\bin\dotnet\lua51.x86.dll @RootDirectory\appserver\xclient\files\lua51.x86.dll /y
  50: copy @RootDirectory\bin\dotnet\LuaInterface.x64.dll @RootDirectory\appserver\xclient\files\LuaInterface.x64.dll /y
  51: copy @RootDirectory\bin\dotnet\LuaInterface.x86.dll @RootDirectory\appserver\xclient\files\LuaInterface.x86.dll /y
  52: copy @RootDirectory\bin\dotnet\Microsoft.Data.ConnectionUI.Dialog.dll @RootDirectory\appserver\xclient\files\Microsoft.Data.ConnectionUI.Dialog.dll /y
  53: copy @RootDirectory\bin\dotnet\Microsoft.Data.ConnectionUI.dll @RootDirectory\appserver\xclient\files\Microsoft.Data.ConnectionUI.dll /y
  54: copy @RootDirectory\bin\dotnet\Microsoft.XmlNotepad.dll @RootDirectory\appserver\xclient\files\Microsoft.XmlNotepad.dll /y
  55: copy @RootDirectory\bin\dotnet\MongoDB.dll @RootDirectory\appserver\xclient\files\MongoDB.dll /y
  56: copy @RootDirectory\bin\dotnet\MySql.Data.dll @RootDirectory\appserver\xclient\files\MySql.Data.dll /y
  57: copy @RootDirectory\bin\dotnet\NetronGraphLib.dll @RootDirectory\appserver\xclient\files\NetronGraphLib.dll /y
  58: copy @RootDirectory\bin\dotnet\protobuf-net.xml @RootDirectory\appserver\xclient\files\protobuf-net.xml /y
  59: copy @RootDirectory\bin\dotnet\RdlDesigner.dll @RootDirectory\appserver\xclient\files\RdlDesigner.dll /y
  60: copy @RootDirectory\bin\dotnet\RdlEngine.dll @RootDirectory\appserver\xclient\files\RdlEngine.dll /y
  61: copy @RootDirectory\bin\dotnet\RdlViewer.dll @RootDirectory\appserver\xclient\files\RdlViewer.dll /y
  62: copy @RootDirectory\bin\dotnet\System.Data.SQLite.DLL @RootDirectory\appserver\xclient\files\System.Data.SQLite.DLL /y
  63: copy @RootDirectory\bin\dotnet\System.Workflow.Activities.dll @RootDirectory\appserver\xclient\files\System.Workflow.Activities.dll /y
  64: copy @RootDirectory\bin\dotnet\System.Workflow.ComponentModel.dll @RootDirectory\appserver\xclient\files\System.Workflow.ComponentModel.dll /y
  65: copy @RootDirectory\bin\dotnet\System.Workflow.Runtime.dll @RootDirectory\appserver\xclient\files\System.Workflow.Runtime.dll /y
  66: copy @RootDirectory\bin\dotnet\update.ini @RootDirectory\appserver\xclient\files\update.ini /y
  67: copy @RootDirectory\bin\dotnet\WF.Demo.DAL.dll @RootDirectory\appserver\xclient\files\WF.Demo.DAL.dll /y
  68: copy @RootDirectory\bin\dotnet\WF.Demo.UI.dll @RootDirectory\appserver\xclient\files\WF.Demo.UI.dll /y
  69: @rem 複製到下載配置目錄
  70: copy @RootDirectory\bin\dotnet\EAS.SmartUpdateConfig.exe @RootDirectory\appserver\xclient\EAS.SmartUpdateConfig.exe /y
  71: copy @RootDirectory\bin\dotnet\EAS.SmartUpdateConfig.exe.config @RootDirectory\appserver\xclient\EAS.SmartUpdateConfig.exe.config /y
  72: @rem 複製到SOA服務Bin目錄
  73: copy @RootDirectory\bin\dotnet\AgileIM.Contracts.dll @RootDirectory\appserver\bin\AgileIM.Contracts.dll /y
  74: copy @RootDirectory\bin\dotnet\AgileIM.Service.dll @RootDirectory\appserver\bin\AgileIM.Service.dll /y
  75: copy @RootDirectory\bin\dotnet\EAS.BPM.Activities.dll @RootDirectory\appserver\bin\EAS.BPM.Activities.dll /y
  76: copy @RootDirectory\bin\dotnet\EAS.BPM.BLL.Host.dll @RootDirectory\appserver\bin\EAS.BPM.BLL.Host.dll /y
  77: copy @RootDirectory\bin\dotnet\EAS.Configure.exe @RootDirectory\appserver\bin\EAS.Configure.exe /y
  78: copy @RootDirectory\bin\dotnet\EAS.Configure.exe.config @RootDirectory\appserver\bin\EAS.Configure.exe.config /y
  79: copy @RootDirectory\bin\dotnet\EAS.Data.dll @RootDirectory\appserver\bin\EAS.Data.dll /y
  80: copy @RootDirectory\bin\dotnet\EAS.Data.Provider.dll @RootDirectory\appserver\bin\EAS.Data.Provider.dll /y
  81: copy @RootDirectory\bin\dotnet\EAS.Data.xml @RootDirectory\appserver\bin\EAS.Data.xml /y
  82: copy @RootDirectory\bin\dotnet\EAS.DbInitializer.exe @RootDirectory\appserver\bin\EAS.DbInitializer.exe /y
  83: copy @RootDirectory\bin\dotnet\EAS.DbInitializer.exe.config @RootDirectory\appserver\bin\EAS.DbInitializer.exe.config /y
  84: copy @RootDirectory\bin\dotnet\EAS.Distributed.dll @RootDirectory\appserver\bin\EAS.Distributed.dll /y
  85: copy @RootDirectory\bin\dotnet\EAS.Explorer.BLL.Contracts.dll @RootDirectory\appserver\bin\EAS.Explorer.BLL.Contracts.dll /y
  86: copy @RootDirectory\bin\dotnet\EAS.Explorer.BLL.Host.dll @RootDirectory\appserver\bin\EAS.Explorer.BLL.Host.dll /y
  87: copy @RootDirectory\bin\dotnet\EAS.Explorer.dll @RootDirectory\appserver\bin\EAS.Explorer.dll /y
  88: copy @RootDirectory\bin\dotnet\EAS.Explorer.Entities.dll @RootDirectory\appserver\bin\EAS.Explorer.Entities.dll /y
  89: copy @RootDirectory\bin\dotnet\EAS.MicroKernel.dll @RootDirectory\appserver\bin\EAS.MicroKernel.dll /y
  90: copy @RootDirectory\bin\dotnet\EAS.Monitor.dll @RootDirectory\appserver\bin\EAS.Monitor.dll /y
  91: copy @RootDirectory\bin\dotnet\EAS.NLB.Monitor.exe @RootDirectory\appserver\bin\EAS.NLB.Monitor.exe /y
  92: copy @RootDirectory\bin\dotnet\EAS.NLB.Server.exe @RootDirectory\appserver\bin\EAS.NLB.Server.exe /y
  93: copy @RootDirectory\bin\dotnet\EAS.NLB.Server.exe.config @RootDirectory\appserver\bin\EAS.NLB.Server.exe.config /y
  94: copy @RootDirectory\bin\dotnet\EAS.NLB.Server.x64.exe @RootDirectory\appserver\bin\EAS.NLB.Server.x64.exe /y
  95: copy @RootDirectory\bin\dotnet\EAS.SOA.Server.exe @RootDirectory\appserver\bin\EAS.SOA.Server.exe /y
  96: copy @RootDirectory\bin\dotnet\EAS.SOA.Server.exe.config @RootDirectory\appserver\bin\EAS.SOA.Server.exe.config /y
  97: copy @RootDirectory\bin\dotnet\EAS.SOA.Server.x64.exe @RootDirectory\appserver\bin\EAS.SOA.Server.x64.exe /y
  98: copy @RootDirectory\bin\dotnet\EAS.SOA.Server.x64.exe.config @RootDirectory\appserver\bin\EAS.SOA.Server.x64.exe.config /y
  99: copy @RootDirectory\bin\dotnet\lua51.x64.dll @RootDirectory\appserver\bin\lua51.x64.dll /y
 100: copy @RootDirectory\bin\dotnet\lua51.x86.dll @RootDirectory\appserver\bin\lua51.x86.dll /y
 101: copy @RootDirectory\bin\dotnet\LuaInterface.x64.dll @RootDirectory\appserver\bin\LuaInterface.x64.dll /y
 102: copy @RootDirectory\bin\dotnet\LuaInterface.x86.dll @RootDirectory\appserver\bin\LuaInterface.x86.dll /y
 103: copy @RootDirectory\bin\dotnet\MongoDB.dll @RootDirectory\appserver\bin\MongoDB.dll /y
 104: copy @RootDirectory\bin\dotnet\MySql.Data.dll @RootDirectory\appserver\bin\MySql.Data.dll /y
 105: copy @RootDirectory\bin\dotnet\RdlEngine.dll @RootDirectory\appserver\bin\RdlEngine.dll /y
 106: copy @RootDirectory\bin\dotnet\RdlViewer.dll @RootDirectory\appserver\bin\RdlViewer.dll /y
 107: copy @RootDirectory\bin\dotnet\soaserver.start.bat @RootDirectory\appserver\bin\soaserver.start.bat /y
 108: copy @RootDirectory\bin\dotnet\soaserver.start.bat @RootDirectory\appserver\bin\install.bat /y
 109: copy @RootDirectory\bin\dotnet\soaserver.start.bat @RootDirectory\appserver\bin\uinstall.bat /y
 110: copy @RootDirectory\bin\dotnet\System.Data.SQLite.DLL @RootDirectory\appserver\bin\System.Data.SQLite.DLL /y
 111: copy @RootDirectory\bin\dotnet\System.Workflow.Activities.dll @RootDirectory\appserver\bin\System.Workflow.Activities.dll /y
 112: copy @RootDirectory\bin\dotnet\System.Workflow.ComponentModel.dll @RootDirectory\appserver\bin\System.Workflow.ComponentModel.dll /y
 113: copy @RootDirectory\bin\dotnet\System.Workflow.Runtime.dll @RootDirectory\appserver\bin\System.Workflow.Runtime.dll /y
 114: copy @RootDirectory\bin\dotnet\WF.Demo.DAL.dll @RootDirectory\appserver\bin\WF.Demo.DAL.dll /y
 115:  

     其中@RootDirectory程式會根據執行時工作目錄進行替換,注意:下載的AgileEAS.NET SOA中介軟體平臺的解壓目錄路徑之中最好不要帶空格和中文

     接下來我們配置服務端,資料庫我們將使用“AgileEAS.NET SOA 中介軟體平臺5.2版本下載、配置學習(一):下載平臺並基於直連環境執行一文所建立和初始化的”eas_demo”資料庫。

     我們執行“AppServer\Bin”目錄之中的“EAS.Configure.exe”AgileEAS.NET SOA中介軟體配置檔案生成工具生成服務端配置:

     一定要選中“生成SOA分散式伺服器配置”和“儲存配置到AgileEAS.NET SOA 平臺相關配置檔案”然後點“下一步”:

     填寫WCF服務所需要的通訊埠號(http和tcp各一個)、以及Socket通訊服務的tcp的埠”以及資料庫連線資訊,然後點“下一步”:

     介面上方是根據所設引數生成的配置資訊,此處,可以改變配置資訊的輸出路徑,預設為當前目錄之中的“EAS.SOA.Server.exe.config”,點選“完成”輸出配置:

     至此,服務端的配置已經完成,接焉為我們以控制元件臺方式執行一下SOA服務端,執行“AppServer\Bin”目錄之中的“soaserver.start.bat”指處理檔案:

     “soaserver.start.bat”批處理檔案是SOA服務的控制檯執行指令碼,即以控制檯模式執行SOA服務端,我們執行如下:

     “appServer\Binsoaserver.start.bat”批處理檔案其內容如下:

   1: EAS.soa.Server.exe -run
   2: pause

     其本質是“EAS.soa.Server.exe -run”這一旬,EAS.SOA.Server.exe帶了一個啟動參考 -run,即告訴EAS.SOA.Server.exe以控制檯方式執行承載服務,除-run引數之外,EAS.SOA.Server.exe還支援以下引數:

     -i 或者/i:向Windows服務控制器安裝AgileEAS.NET SOA中介軟體平臺SOA服務。

     -u 或者/u:解除安裝已存在的AgileEAS.NET SOA中介軟體平臺SOA服務。

     /name=例項名:在安裝、解除安裝AgileEAS.NET SOA中介軟體平臺SOA服務的時候,告訴服務控制器,要安裝什麼例項的名稱是什麼,AgileEAS.NET SOA中介軟體的服務設計為可以多服務例項執行,即一臺電腦上可以執行例項名稱為”EAS”、“Demo”、“HIS”、“EMR”、“PACS”等不同的服務例項,類似於SQL的命名實現,當然這個引數是一個可選參考,如果不使用本引數,則安裝和解除安裝預設例項,一臺電腦只能安裝一個預設例項,比如以下指令碼:

     “AppServer\Bin\install.bat”指令碼

EAS.SOA.Server.exe /i /name=demo
pause

     表現安裝一個例項名稱為“demo”的AgileEAS.NET SOA中介軟體平臺SOA服務例項,我們可以執行這個指令碼:

     我們開啟系統管理工具之中的服務管理:

     那以在生產環境之中我們就可以通過這種方式部署AgileEAS.NET SOA 中介軟體平臺的SOA服務,服務安裝之後會隨計算機啟動而自動啟動,我們可以很方便的通過系統服務管理工具進行啟動、停止服務,如果我們不使用這個服務了,我們可以使用以下指令碼解除安裝這個服務:

     “AppServer\Bin\uinstall.bat”指令碼

   1: EAS.SOA.Server.exe /u /name=demo
   2: pause

     執行指令碼如下:

     我們執行“appServer\Bin\soaserver.start.bat”啟動服務進行下一步配置。

四、配置分散式WinClient客戶段

     在第三節中我們使用”EAS.Publisher.exe”分發程式分發檔案,會自動把客戶段執行檔案複製到”appServer\xclient\files”之中,那麼我們執行”appServer\xclient\files\EAS.Configure.exe”配置程式配置客戶端

    選中“生成客戶端配置(分散式訪問結果)”和“儲存配置到AgileEAS.NET SOA 平臺相關配置檔案”然後點選“下一步”:

    這裡需要注意的是埠號要根據選擇的通訊模式和第三節所設定的伺服器引數進行決定,tcp對應第三節伺服器設定之中的WCF服務之中的Tcp埠號,http對應WCF服務之中的http埠號,socket對應socket服務模式之中的tcp埠號。

    點選“下一步”繼續:

    點選“完成”輸出客戶端配置到“EAS.WinClient.Start.exe.config”配置檔案之中,內容如下:

   1: <?xml version="1.0" encoding="utf-8"?>
   2: <configuration>
   3:   <configSections>
   4:     <section name="eas" type="EAS.ConfigHandler,EAS.MicroKernel" />
   5:   </configSections>
   6:   <!--SQLite執行必需-->
   7:   <startup useLegacyV2RuntimeActivationPolicy="true">
   8:     <supportedRuntime version="v4.0"/>
   9:   </startup>
  10:   <eas>
  11:     <configurations>
  12:       <item name="Key" value="Value" />
  13:     </configurations>
  14:     <objects>
  15:       <!--分散式通訊元件。-->
  16:       <object name="ServiceBridger" assembly="EAS.Distributed" type="EAS.Distributed.ServiceBridger" LifestyleType="Thread" >
  17:         <property name="ServiceName" type="string" value="EAS.RMI.Service" />
  18:       </object>
  19:       <object name="DataAccessor" assembly="EAS.Distributed" type="EAS.Distributed.DataAccessor" LifestyleType="Thread" >
  20:         <property name="ServiceBridger" type="object" value="ServiceBridger" />
  21:       </object>
  22:       <object name="OrmAccessor" assembly="EAS.Distributed" type="EAS.Distributed.OrmAccessor" LifestyleType="Thread" >
  23:         <property name="ServiceBridger" type="object" value="ServiceBridger" />
  24:         <property name="DataAccessor" type="object" value="DataAccessor" />
  25:       </object>
  26:       <!--日誌管理-->
  27:       <object name="Logger" assembly="EAS.MicroKernel" type="EAS.Loggers.TextLogger" LifestyleType="Singleton" />
  28:       <!--資源-->
  29:       <!--<object name="EAS.Explorer.Resource" assembly="EAS.Explorer.Res" type="EAS.Explorer.Res.Resources" LifestyleType="Singleton" />-->
  30:     </objects>
  31:     <services>
  32:       <service name="EAS.RMI.Service" service-type="WcfService" singleton="true" url="net.tcp://127.0.0.1:6607/eas/services/EAS.RMIService" />
  33:       <service name="EAS.Storage.Service" service-type="WcfService" singleton="true" url="net.tcp://127.0.0.1:6607/eas/services/EAS.StorageService" />
  34:     </services>
  35:   </eas>
  36: </configuration>

    至此為止,我們完成了不帶自動升級功能的分散式客戶端配置,我們啟動客戶程式“EAS.WinClient.Start.exe”,並使用賬號:Adminstrator,密碼:sa登入,看到如下介面:

     那麼如何分辨程式是以分散式方式執行的呢,我們開啟以控制元件臺執行的SOA服務程式CMD視窗,就會看到其中一些訊息通訊記錄:

五、配置自動升級

     第四節我們在”appServer\xclient\files”目錄之中成功配置了分散式客戶端並且成功執行,那麼我們”appServer\xclient\files”為基礎配置一個自升級服務。

     開啟”appServer\xclient\files\update.ini”檔案進行修改:

   1: # AgileEAS.Net 平臺升級控制元件檔案。
   2:  
   3: [config]
   4:  
   5: allow = 0
   6: application = EAS.WinClient.Start.exe
   7: url = net.tcp://localhost:6607/eas/services/EAS.UpdateService

    其中allow表示是否升級,url為升級服務地址,地址組成為wcf協議net.tcp://或http://+主機名稱為IP+埠號+/eas/services/eas.updateservice,application表示升級完成之後啟動執行的程式,我們根據第三節的配置修改如下:

   1: # AgileEAS.Net 平臺升級控制元件檔案。
   2:  
   3: [config]
   4:  
   5: allow = 1
   6: application = EAS.WinClient.Start.exe
   7: url = net.tcp://localhost:6607/eas/services/EAS.UpdateService

    然後我們刪除目錄裡面的臨時資料夾“Data”和“logs”,進行”appServer\xclient”,執行目錄之中的”EAS.SmartUpdateConfig.exe“程式:

     ”EAS.SmartUpdateConfig.exe“程式是AgileEAS.NET  SOA 中介軟體平臺的升級配置程式,即當我們的應用的程式檔案發生了新級和變更,需要把檔案複製”appServer\xclient\files”目錄之中,並且執行”EAS.SmartUpdateConfig.exe“程式以生成升級配置檔案,升級配置檔案儲存在”appServer\xclient\conig”目錄之中的”SmartUpdate.xml“檔案之中,其內容如下:

   1: <?xml version="1.0" encoding="utf-8"?>
   2: <SmartConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   3:   <URI>http://www.smarteas.net/</URI>
   4:   <Name>AgileEAS.NET SOA平臺升級配置檔案</Name>
   5:   <Description>用於AgileEAS.NET SOA平臺SmartClient/ActiveX執行容器模組升級之用</Description>
   6:   <StartEx />
   7:   <Time>2013-10-16T08:56:44.67765+08:00</Time>
   8:   <Files>
   9:     <SmartFile>
  10:       <FileName>AgileIM.Client.exe</FileName>
  11:       <Version>1.0.0.0</Version>
  12:       <Time>2013-10-15T16:59:23.5252+08:00</Time>
  13:     </SmartFile>
  14:     <SmartFile>
  15:       <FileName>AgileIM.Client.exe.config</FileName>
  16:       <Time>2013-08-27T12:10:12.0756571+08:00</Time>
  17:     </SmartFile>
  18:     <SmartFile>
  19:       <FileName>AgileIM.Contracts.dll</FileName>
  20:       <Version>1.0.0.0</Version>
  21:       <Time>2013-10-12T19:50:18.155+08:00</Time>
  22:     </SmartFile>
  23:     <SmartFile>
  24:       <FileName>AgileIM.Service.dll</FileName>
  25:       <Version>1.0.0.0</Version>
  26:       <Time>2013-10-15T16:59:24.5722599+08:00</Time>
  27:     </SmartFile>
  28:     <SmartFile>
  29:       <FileName>AxInterop.grdesLib.dll</FileName>
  30:       <Version>5.0.0.0</Version>
  31:       <Time>2013-10-12T19:50:02.442+08:00</Time>
  32:     </SmartFile>
  33:     <SmartFile>
  34:       <FileName>AxInterop.grproLib.dll</FileName>
  35:       <Version>5.0.0.0</Version>
  36:       <Time>2013-10-12T19:50:02.975+08:00</Time>
  37:     </SmartFile>
  38:     <SmartFile>
  39:       <FileName>EAS.ActiveXForm.ClientClasp.AddIn.dll</FileName>
  40:       <Version>1.0.0.0</Version>
  41:       <Time>2013-10-15T17:00:44.6468399+08:00</Time>
  42:     </SmartFile>
  43:     <SmartFile>
  44:       <FileName>EAS.BPM.Activities.dll</FileName>
  45:       <Version>1.1.0.0</Version>
  46:       <Time>2013-10-15T16:59:38.4650545+08:00</Time>
  47:     </SmartFile>
  48:     <SmartFile>
  49:       <FileName>EAS.BPM.BLL.Host.dll</FileName>
  50:       <Version>1.0.0.0</Version>
  51:       <Time>2013-10-15T17:00:41.6456682+08:00</Time>
  52:     </SmartFile>
  53:     <SmartFile>
  54:       <FileName>EAS.BPM.WinUI.dll</FileName>
  55:       <Version>2.0.0.0</Version>
  56:       <Time>2013-10-15T16:59:45.0194294+08:00</Time>
  57:     </SmartFile>
  58:     <SmartFile>
  59:       <FileName>eas.client.ini</FileName>
  60:       <Time>2013-10-15T21:22:56.5866492+08:00</Time>
  61:     </SmartFile>
  62:     <SmartFile>
  63:       <FileName>EAS.Configure.exe</FileName>
  64:       <Version>2.0.0.0</Version>
  65:       <Time>2013-10-15T16:59:27.6444356+08:00</Time>
  66:     </SmartFile>
  67:     <SmartFile>
  68:       <FileName>EAS.Configure.exe.config</FileName>
  69:       <Time>2013-04-15T19:59:09.4420283+08:00</Time>
  70:     </SmartFile>
  71:     <SmartFile>
  72:       <FileName>EAS.Data.Controls.dll</FileName>
  73:       <Version>1.0.0.0</Version>
  74:       <Time>2013-10-15T17:36:07.4252559+08:00</Time>
  75:     </SmartFile>
  76:     <SmartFile>
  77:       <FileName>EAS.Data.dll</FileName>
  78:       <Version>5.0.0.0</Version>
  79:       <Time>2013-10-15T16:59:34.241813+08:00</Time>
  80:     </SmartFile>
  81:     <SmartFile>
  82:       <FileName>EAS.Data.Provider.dll</FileName>
  83:       <Version>5.0.0.0</Version>
  84:       <Time>2013-10-15T16:59:59.6222646+08:00</Time>
  85:     </SmartFile>
  86:     <SmartFile>
  87:       <FileName>EAS.Distributed.dll</FileName>
  88:       <Version>5.0.0.0</Version>
  89:       <Time>2013-10-15T17:00:39.8145635+08:00</Time>
  90:     </SmartFile>
  91:     <SmartFile>
  92:       <FileName>EAS.Explorer.BLL.Contracts.dll</FileName>
  93:       <Version>5.0.0.0</Version>
  94:       <Time>2013-10-12T19:50:17.932+08:00</Time>
  95:     </SmartFile>
  96:     <SmartFile>
  97:       <FileName>EAS.Explorer.BLL.Host.dll</FileName>
  98:       <Version>5.0.0.0</Version>
  99:       <Time>2013-10-15T17:00:14.297104+08:00</Time>
 100:     </SmartFile>
 101:     <SmartFile>
 102:       <FileName>EAS.Explorer.dll</FileName>
 103:       <Version>5.0.0.0</Version>
 104:       <Time>2013-10-12T19:50:16.931+08:00</Time>
 105:     </SmartFile>
 106:     <SmartFile>
 107:       <FileName>EAS.Explorer.Entities.dll</FileName>
 108:       <Version>5.0.0.0</Version>
 109:       <Time>2013-10-15T17:00:16.9642565+08:00</Time>
 110:     </SmartFile>
 111:     <SmartFile>
 112:       <FileName>EAS.Explorer.Res.dll</FileName>
 113:       <Version>1.1.0.0</Version>
 114:       <Time>2013-10-12T19:50:50.7467432+08:00</Time>
 115:     </SmartFile>
 116:     <SmartFile>
 117:       <FileName>EAS.Explorer.WinUI.dll</FileName>
 118:       <Version>5.0.0.0</Version>
 119:       <Time>2013-10-15T16:59:56.5250875+08:00</Time>
 120:     </SmartFile>
 121:     <SmartFile>
 122:       <FileName>EAS.FormDesigner.exe</FileName>
 123:       <Version>5.0.0.0</Version>
 124:       <Time>2013-10-15T16:59:46.1954967+08:00</Time>
 125:     </SmartFile>
 126:     <SmartFile>
 127:       <FileName>EAS.GReport.Controls.dll</FileName>
 128:       <Version>1.0.0.0</Version>
 129:       <Time>2013-10-15T17:00:07.2997038+08:00</Time>
 130:     </SmartFile>
 131:     <SmartFile>
 132:       <FileName>EAS.MicroKernel.dll</FileName>
 133:       <Version>5.0.0.0</Version>
 134:       <Time>2013-10-15T16:59:29.7545563+08:00</Time>
 135:     </SmartFile>
 136:     <SmartFile>
 137:       <FileName>EAS.Monitor.dll</FileName>
 138:       <Version>1.0.0.0</Version>
 139:       <Time>2013-10-12T19:50:10.901+08:00</Time>
 140:     </SmartFile>
 141:     <SmartFile>
 142:       <FileName>EAS.NLB.Monitor.exe</FileName>
 143:       <Version>1.0.0.0</Version>
 144:       <Time>2013-10-15T17:00:08.143752+08:00</Time>
 145:     </SmartFile>
 146:     <SmartFile>
 147:       <FileName>EAS.NLB.Server.exe</FileName>
 148:       <Version>1.0.0.0</Version>
 149:       <Time>2013-10-15T17:00:16.3272201+08:00</Time>
 150:     </SmartFile>
 151:     <SmartFile>
 152:       <FileName>EAS.OrmDesigner.exe</FileName>
 153:       <Version>5.0.0.0</Version>
 154:       <Time>2013-10-15T16:58:10.8720445+08:00</Time>
 155:     </SmartFile>
 156:     <SmartFile>
 157:       <FileName>EAS.OrmDesigner.exe.config</FileName>
 158:       <Time>2012-01-07T11:28:39.2362631+08:00</Time>
 159:     </SmartFile>
 160:     <SmartFile>
 161:       <FileName>EAS.Report.Controls.dll</FileName>
 162:       <Version>3.0.0.0</Version>
 163:       <Time>2013-10-15T17:00:11.6179508+08:00</Time>
 164:     </SmartFile>
 165:     <SmartFile>
 166:       <FileName>EAS.SmartUpdater.exe</FileName>
 167:       <Version>1.0.0.0</Version>
 168:       <Time>2013-10-15T16:59:54.662981+08:00</Time>
 169:     </SmartFile>
 170:     <SmartFile>
 171:       <FileName>EAS.SOA.Monitor.exe</FileName>
 172:       <Version>1.0.0.0</Version>
 173:       <Time>2013-10-15T17:00:20.4044533+08:00</Time>
 174:     </SmartFile>
 175:     <SmartFile>
 176:       <FileName>EAS.ThirdParty.Controls.dll</FileName>
 177:       <Version>1.0.0.0</Version>
 178:       <Time>2013-10-12T19:49:55.311+08:00</Time>
 179:     </SmartFile>
 180:     <SmartFile>
 181:       <FileName>EAS.WinClient.dll</FileName>
 182:       <Version>5.1.0.0</Version>
 183:       <Time>2013-10-15T17:00:24.8407071+08:00</Time>
 184:     </SmartFile>
 185:     <SmartFile>
 186:       <FileName>EAS.WinClient.Start.exe</FileName>
 187:       <Version>5.0.0.0</Version>
 188:       <Time>2013-10-15T16:59:14.0236565+08:00</Time>
 189:     </SmartFile>
 190:     <SmartFile>
 191:       <FileName>EAS.WinClient.Start.exe.config</FileName>
 192:       <Time>2013-10-15T21:20:03.86277+08:00</Time>
 193:     </SmartFile>
 194:     <SmartFile>
 195:       <FileName>EAS.Windows.dll</FileName>
 196:       <Version>5.0.0.0</Version>
 197:       <Time>2013-10-15T17:00:30.9600571+08:00</Time>
 198:     </SmartFile>
 199:     <SmartFile>
 200:       <FileName>EAS.Wpf.Controls.dll</FileName>
 201:       <Version>1.0.0.0</Version>
 202:       <Time>2013-10-15T17:00:38.075464+08:00</Time>
 203:     </SmartFile>
 204:     <SmartFile>
 205:       <FileName>grdes50.dll</FileName>
 206:       <Version>5, 8, 13, 620</Version>
 207:       <Time>2013-06-24T23:11:32+08:00</Time>
 208:     </SmartFile>
 209:     <SmartFile>
 210:       <FileName>gregn50.dll</FileName>
 211:       <Version>5, 8, 13, 620</Version>
 212:       <Time>2013-06-24T23:10:26+08:00</Time>
 213:     </SmartFile>
 214:     <SmartFile>
 215:       <FileName>ICSharpCode.AvalonEdit.dll</FileName>
 216:       <Version>4.3.1.9429</Version>
 217:       <Time>2013-10-12T19:50:15.045+08:00</Time>
 218:     </SmartFile>
 219:     <SmartFile>
 220:       <FileName>Interop.grdesLib.dll</FileName>
 221:       <Version>5.0.0.0</Version>
 222:       <Time>2013-10-12T19:50:01.56+08:00</Time>
 223:     </SmartFile>
 224:     <SmartFile>
 225:       <FileName>Interop.grproLib.dll</FileName>
 226:       <Version>5.0.0.0</Version>
 227:       <Time>2013-10-12T19:50:02.088+08:00</Time>
 228:     </SmartFile>
 229:     <SmartFile>
 230:       <FileName>itextsharp.dll</FileName>
 231:       <Version>4.1.2.0</Version>
 232:       <Time>2011-04-19T10:03:14+08:00</Time>
 233:     </SmartFile>
 234:     <SmartFile>
 235:       <FileName>lua51.x64.dll</FileName>
 236:       <Time>2013-09-30T13:25:51.209+08:00</Time>
 237:     </SmartFile>
 238:     <SmartFile>
 239:       <FileName>lua51.x86.dll</FileName>
 240:       <Time>2013-09-30T13:27:36.369897+08:00</Time>
 241:     </SmartFile>
 242:     <SmartFile>
 243:       <FileName>LuaInterface.x64.dll</FileName>
 244:       <Version>2.0.4.24313</Version>
 245:       <Time>2013-09-30T13:30:27.8847071+08:00</Time>
 246:     </SmartFile>
 247:     <SmartFile>
 248:       <FileName>LuaInterface.x86.dll</FileName>
 249:       <Version>2.0.4.24313</Version>
 250:       <Time>2013-09-30T13:30:27.8937076+08:00</Time>
 251:     </SmartFile>
 252:     <SmartFile>
 253:       <FileName>Microsoft.Data.ConnectionUI.Dialog.dll</FileName>
 254:       <Version>8.0.50727.42 (RTM.050727-4200)</Version>
 255:       <Time>2011-04-19T14:03:22+08:00</Time>
 256:     </SmartFile>
 257:     <SmartFile>
 258:       <FileName>Microsoft.Data.ConnectionUI.dll</FileName>
 259:       <Version>8.0.50727.42 (RTM.050727-4200)</Version>
 260:       <Time>2011-04-19T14:03:22+08:00</Time>
 261:     </SmartFile>
 262:     <SmartFile>
 263:       <FileName>Microsoft.XmlNotepad.dll</FileName>
 264:       <Version>2.5.3145.19740</Version>
 265:       <Time>2008-08-11T11:58:04+08:00</Time>
 266:     </SmartFile>
 267:     <SmartFile>
 268:       <FileName>MongoDB.dll</FileName>
 269:       <Version>0.90.0.1</Version>
 270:       <Time>2012-03-16T19:11:12.6696083+08:00</Time>
 271:     </SmartFile>
 272:     <SmartFile>
 273:       <FileName>MySql.Data.dll</FileName>
 274:       <Version>5.0.9.0</Version>
 275:       <Time>2008-04-14T12:04:28+08:00</Time>
 276:     </SmartFile>
 277:     <SmartFile>
 278:       <FileName>NetronGraphLib.dll</FileName>
 279:       <Version>2.2.3328.30433</Version>
 280:       <Time>2009-02-10T16:54:28+08:00</Time>
 281:     </SmartFile>
 282:     <SmartFile>
 283:       <FileName>RdlDesigner.dll</FileName>
 284:       <Version>3.9.7.0</Version>
 285:       <Time>2013-10-12T19:50:00.225+08:00</Time>
 286:     </SmartFile>
 287:     <SmartFile>
 288:       <FileName>RdlEngine.dll</FileName>
 289:       <Version>3.9.7.0</Version>
 290:       <Time>2013-10-12T19:49:53.522+08:00</Time>
 291:     </SmartFile>
 292:     <SmartFile>
 293:       <FileName>RdlViewer.dll</FileName>
 294:       <Version>3.9.6.0</Version>
 295:       <Time>2013-10-12T19:49:56.182+08:00</Time>
 296:     </SmartFile>
 297:     <SmartFile>
 298:       <FileName>System.Data.SQLite.DLL</FileName>
 299:       <Version>1.0.66.0</Version>
 300:       <Time>2010-04-18T13:34:12+08:00</Time>
 301:     </SmartFile>
 302:     <SmartFile>
 303:       <FileName>System.Workflow.Activities.dll</FileName>
 304:       <Version>4.0.30319.1 (RTMRel.030319-0100)</Version>
 305:       <Time>2010-03-18T19:31:26+08:00</Time>
 306:     </SmartFile>
 307:     <SmartFile>
 308:       <FileName>System.Workflow.ComponentModel.dll</FileName>
 309:       <Version>4.0.30319.1 (RTMRel.030319-0100)</Version>
 310:       <Time>2010-03-18T19:31:26+08:00</Time>
 311:     </SmartFile>
 312:     <SmartFile>
 313:       <FileName>System.Workflow.Runtime.dll</FileName>
 314:       <Version>4.0.30319.1 (RTMRel.030319-0100)</Version>
 315:       <Time>2010-03-18T19:31:26+08:00</Time>
 316:     </SmartFile>
 317:     <SmartFile>
 318:       <FileName>update.ini</FileName>
 319:       <Time>2013-10-15T21:32:33.0976238+08:00</Time>
 320:     </SmartFile>
 321:     <SmartFile>
 322:       <FileName>WF.Demo.DAL.dll</FileName>
 323:       <Version>1.0.0.0</Version>
 324:       <Time>2013-10-12T19:49:57.9107211+08:00</Time>
 325:     </SmartFile>
 326:     <SmartFile>
 327:       <FileName>WF.Demo.UI.dll</FileName>
 328:       <Version>1.0.0.0</Version>
 329:       <Time>2013-10-12T19:50:49.1896541+08:00</Time>
 330:     </SmartFile>
 331:   </Files>
 332: </SmartConfig>

     ”SmartUpdate.xml“檔案為平臺的升級配置檔案,其本質是儲存一個檔案及其最後修改時間的一個清單,客戶端也持有這麼一份清單,客戶端會依據自己持有的清單與伺服器上的清單比對以判定需要升級更新那些檔案。

      ”appServer\xclient”為AgileEAS.NET SOA 中介軟體的服務端升級目錄,這個路徑是不能更改的,在AgileEAS.NET SOA 中介軟體有服務設計之中更新了硬性的規定,其中”appServer\xclient\files”目錄其本質就是客戶端的最新複製。

     當我們完成以上配置之後,我們來驗證一個自動升級是否可以使用,我們把”appServer\xclient\files”複製到其他地方,比如我們複製到“D:\”並重新命名為”d:\eas.client”,如下圖:

     然後我們執行“d:\eas.client\eas.winclient.start.exe”,系統有如下提示:

     我們點選“確定”將會啟動升級程式進行升級:

     升級完成之後點選“關閉”,系統將會自己啟動“d:\eas.client\eas.winclient.start.exe”,開啟登入視窗:

     輸入使用者:Administrator密碼:sa,點選登入,開啟主介面:

六、聯絡我們

     為了完善、改進和推廣AgileEAS.NET而成立了敏捷軟體工程實驗室,是一家研究、推廣和發展新技術,並致力於提供具有自主智慧財產權的業務基礎平臺軟體,以及基於業務基礎平臺了開發的管理軟體的專業軟體提供商。主要業務是為客戶提供軟體企業研發管理解決方案、企業管理軟體開發,以及相關的技術支援,管理及技術諮詢與培訓業務。

     AgileEAS.NET平臺自2004年秋呱呱落地一來,我就一直在逐步完善和改進,也被應用於保險、醫療、電子商務、房地產、鐵路、教育等多個應用,但一直都是以我個人在推廣,2010年因為我辭職休息,我就想到把AgileEAS.NET推向市場,讓更多的人使用。

     技術團隊成員都是合作多年的老朋友,因為這個平臺是免費的,我們的營運開支主要靠為客戶提供諮詢服務所得,我們都是因為程式設計師的那種理想與信念堅持,在此我感謝一起奮鬥的朋友和一直支援我們工作的客戶、朋友。

團隊網站:http://www.agilelab.cn

AgileEAS.NET網站:http://www.smarteas.net

官方部落格:http://eastjade.cnblogs.com

QQ:47920381

AgileEAS.NET QQ群:

113723486(AgileEAS SOA 平臺)/上限1000人

199463175(AgileEAS SOA 交流)/上限1000人

120661978(AgileEAS.NET 平臺交流)/上限1000人

212867943(AgileEAS.NET研究)/上限500人

147168308(AgileEAS.NET應用)/上限500人

172060626(深度AgileEAS.NET平臺)/上限500人

116773358(AgileEAS.NET 平臺)/上限500人

125643764(AgileEAS.NET探討)/上限500人

193486983(AgileEAS.NET 平臺)/上限500人

郵件:james@agilelab.cn,mail.james@qq.com,

電話:18629261335。

相關文章