Loading JAX-WS handler classes

JAX-WS 處理程式透過 JAX-WS 型 7.0 版 WS-Notification 服務點(處理入埠呼叫)或 WS-Notification 服務(處理出埠呼叫)來與訊息互動,因此,您必須將處理程式類別提供給您想要監視的 WS-Notification 服務點或服務所在的伺服器或叢集。

Before you begin

這項作業假設您已建立您的處理程式。您可以利用 IBM® Rational® Application Developer 或類似的工具來執行這個動作。

About this task

Before you can configure a JAX-WS handler for use with WS-Notification, you must make the handler class available to the server or cluster that hosts the WS-Notification service point or service that you want to monitor. To do this, you create a shared library for the class then add the shared library to the class loader for the server.

Procedure

  1. Package the class file for your handler as a JAR file, then copy the JAR file into a convenient directory.
    Make the handler class available to the application server in one of the following ways:
    • 將個別類別檔複製到 app_server_root/classes 之下,符合類別套件名稱的目錄結構中,其中 app_server_rootWebSphere® Application Server 的安裝根目錄。 For example a handler class com.ibm.jaxws.handler.TestHandler is copied into the app_server_root/classes/com/ibm/jaxws/handler directory.
    • 將所有處理程式的類別檔包裝成 JAR 檔,再將它複製到 app_server_root/lib/app 目錄中。
  2. Start the administrative console.
  3. Create a shared library for the JAR file.
    1. Navigate to 環境 -> 共用程式庫.
    2. Set the scope at which you want the new library to be visible, then click New.
    3. Give the new library a name.
    4. Set the class path to the directory and file name for your handler JAR file.
    5. 儲存對主要配置所做的變更。

    For more information, see 建立共用程式庫.

  4. Create a class loader for the server or cluster on which you want to make the JAR file available.
    1. Navigate to 伺服器 -> 伺服器類型 -> WebSphere Application Server -> server_name -> [伺服器基礎架構] Java 與程序管理 -> 類別載入器.
    2. Click New.
    3. Click OK.
    4. 儲存對主要配置所做的變更。
    For more information, see 配置伺服器的類別載入器.
  5. Add the shared library to the class loader for the server.
    1. Navigate to 伺服器 -> 伺服器類型 -> WebSphere Application Server -> server_name -> [伺服器基礎架構] Java 與程序管理 -> 類別載入器 -> class_loader_name > [其他內容] 共用程式庫參照.
    2. Click Add.
    3. Click on the name of your new library, then click OK.
    4. 儲存對主要配置所做的變更。
    For more information, see Associating shared libraries with servers.

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



時間戳記圖示 前次更新: July 9, 2016 11:16
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tjwsn_jaxws_handler_class
檔名:tjwsn_jaxws_handler_class.html