WebSphere WebSphere Enterprise Service Bus, Version 6.0.1 作業系統: AIX, HP-UX, Linux, Solaris, Windows

使用另一個 JMS 提供者配置事件傳訊

如果您不想使用 WebSphere ESB 的預設傳訊特性來進行事件傳輸, 您可以配置非同步訊息傳輸,以使用不同的「Java 訊息服務 (JMS)」提供者。

開始之前

您必須先利用適當的 JMS 提供者介面來建立 JMS 佇列和 Connection Factory, 才能利用外部 JMS 提供者來配置事件傳訊。

執行這項作業的原因和時機

event-message.jacl Script 會利用 WebSphere MQ 等外部 JMS 提供者, 來設定非同步事件傳輸所需的配置物件:

如果您想設定多個 JMS 佇列給事件伺服器, 您可以執行此 Script 多次,並指定不同的企業應用程式名稱和 JMS 佇列。每當您執行 Script 時, 它會額外部署一個訊息驅動 Bean, 並配置新資源以使用指定的 JMS 佇列。

若要配置事件傳訊,以使用外部 JMS 提供者,請執行下列動作:

這項作業的步驟

  1. 移至設定檔(其中定義您想配置預設傳訊的 WebSphere ESB 執行時期環境)的 $WAS_HOME/event/application 目錄。 (請將 profile_path 換成內含 WebSphere ESB 設定檔的目錄路徑。)
  2. 使用 wsadmin 指令執行 event-message.jacl Script:
    Windows 系統
    %WAS_HOME%\bin\wsadmin -profile event-profile.jacl -f event-message.jacl
      -action install -earfile event-message.ear -node node_name 
      [-server server_name] [cluster cluster_name]
      -appname app_name -qjndi queue -qcfjndi connection_factory
      [-listenerport listener_port] [-activationspecjndi spec_name]
      [-eventprofilescope scope] [-trace]
    Linux 和 UNIX 系統
    $WAS_HOME/bin/wsadmin -profile event-profile.jacl -f event-message.jacl
      -action install -earfile event-message.ear -node node_name 
      [-server server_name] [cluster cluster_name]
      -appname app_name -qjndi queue -qcfjndi connection_factory
      [-listenerport listener_port] [-activationspecjndi spec_name]
      [-eventprofilescope scope] [-trace]
    $WAS_HOME/bin/wsadmin -profile event-profile.jacl -f event-message.jacl
      -action install -earfile event-message.ear -node node_name 
      [-server server_name] [cluster cluster_name]
      -appname app_name -qjndi queue -qcfjndi connection_factory
      [-listenerport listener_port] [-activationspecjndi spec_name]
      [-eventprofilescope scope] [-trace]
    event-message.jacl Script 的參數如下:
    node_name
    傳訊應用程式部署所在的 WebSphere ESB 節點。若要判斷節點名稱,請執行下列動作:
    1. 執行 profile_path/bin/setupCmdLine Script。
    2. 執行 echo $WAS_NODE(Linux/UNIX 系統)或 echo %WAS_NODE%(Windows 系統)指令。
    此值有區分大小寫。如果您要將應用程式部署在叢集中, 請省略此參數。
    server_name
    傳訊應用程式部署所在的 WebSphere 伺服器。此值有區分大小寫。如果您要將應用程式部署在叢集中, 請省略此參數。
    cluster_name
    傳訊應用程式部署所在的 WebSphere 叢集。只有在您要將傳訊配置在叢集中, 且您並未指定節點和伺服器時,才需指定此參數。
    註: 如果您使用 Cloudscape 事件資料庫, 則只支援測試用的叢集作業(不適用於正式作業環境)。
    app_name
    傳訊企業應用程式要用的名稱。這是必要參數。
    queue
    傳訊企業應用程式所要使用之 JMS 佇列的 JNDI 名稱。這個佇列用於指向事件伺服器的非同步傳訊傳輸。 如果您部署傳訊應用程式多次,每次您必須指定不同的 JMS 佇列。
    connection_factory
    傳訊企業應用程式所要使用之 JMS Connection Factory 的 JNDI 名稱。
    listener_port
    傳訊企業應用程式所用的接聽器埠名稱。接聽器埠指定於部署描述子中。只有在您的傳訊應用程式使用接聽器埠時, 才需指定此參數。
    spec_name
    傳訊企業應用程式所用之啟動規格的 JNDI 名稱。啟動規格指定於部署描述子中。只有在您的傳訊應用程式使用應用程式規格時, 才需指定此參數。
    eventprofilescope
    要建立用於事件傳訊之配置設定檔物件的範圍。此為選用參數; 如果您有指定範圍,則會在指定範圍中建立 JMS 傳輸設定檔和發射器 Factory 設定檔。有效值為 cellnodeserver

    -trace 選用參數會使更多的除錯資訊顯示在標準輸出中。

    註:
    • 如果您在 event-message.ear 檔位置方面指定一個完整路徑, 請確定您在路徑中使用的是正斜線 (/)(即使您使用的是 Windows 系統)。
    • 如果您將傳訊應用程式部署在獨立式節點上, 請指定 -conntype none 選用參數,以便在本端模式下執行 wsadmin
    啟動 Script 之後,系統會提示您輸入 JMS 使用者 ID 和密碼。

Task topic

使用條款 | 此頁的評等

時間戳記圖示前次更新: 5 Mar 2006
http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp?topic=/com.ibm.websphere.wesb.doc.nl1_6.0.1\doc\tcei_install_configureJMSMessaging.html

(C) Copyright IBM Corporation 2005. All Rights Reserved.
本資訊中心採用 Eclipse 技術。(http://www.eclipse.org)