利用開發人員工具來進行 OSGi 應用程式疑難排解

您可以利用 WebSphere Developer Tools 來配置 osgiAppConsole-1.0 特性,然後用它來判斷及分析 OSGi 應用程式相關問題。

開始之前

  • 安裝 WebSphere Developer Tools for Eclipse 和 WebSphere® Application Server Liberty。您可以利用下載安裝檔案來安裝工具。
  • 將 OSGi 應用程式部署於執行中的 Liberty 伺服器。
  • 在下載的壓縮檔中,已有 osgiAppConsole-1.0 特性可供使用。 如果尚未安裝這個特性,請利用下列指令,從 Liberty Repository 安裝這個特性:
    bin\installUtility install osgiAppConsole-1.0

程序

  1. server.xml 檔中配置 osgiAppConsole-1.0 特性。
    <featureManager>
      <feature>osgiAppConsole-1.0</feature>
    </featureManager>
  2. 新增安全配置。

    下列範例顯示 admin 角色使用基本授權及 HTTPS 安全的安全配置範例。

    <httpEndpoint httpPort=”9080″ httpsPort=”9443″ id=”defaultHttpEndpoint”/>
    <keyStore id=”defaultKeyStore” password=”Liberty”/>
    <quickStartSecurity userName=”admin” userPassword=”password”/>
  3. 完成下列作業之一,以啟動 OSGi 應用程式主控台OSGi 共用軟體組主控台
    • 啟動 OSGi 應用程式主控台
      1. 在「伺服器」視圖中,用滑鼠右鍵按一下 OSGi 軟體組。
      2. 選取啟動 OSGi 應用程式主控台

      這時工具會開啟瀏覽器來顯示「OSGi 應用程式主控台」頁面。

    • 啟動 OSGi 共用軟體組主控台
      1. 用滑鼠右鍵按一下您的伺服器。
      2. 選取公用程式 > 啟動 OSGI 共用軟體組主控台

      這時工具會開啟瀏覽器來顯示「OSGI 共用軟體組主控台」頁面。


指示主題類型的圖示 作業主題

檔名:twlp_osgi_troubleshoot_tools.html