WebSphere WebSphere Enterprise Service Bus V6.0.1 操作系统: AIX, HP-UX, Linux, Solaris, Windows

使用其他 JMS 提供程序配置事件消息传递

如果您不想使用 WebSphere ESB 缺省消息传递功能进行事件传输,可将异步消息传输配置为使用其他 Java 消息传递服务(JMS)提供程序。

在开始之前

必须先使用 JMS 提供程序的适当接口创建 JMS 队列和连接工厂,才能使用外部 JMS 提供程序配置事件消息传递。

执行此任务的目的和时间

event-message.jacl 脚本使用外部 JMS 提供程序(如 WebSphere MQ)来建立异步事件传输所需的配置对象:

如果想要建立发送至事件服务器的多个 JMS 队列,可多次运行此脚本,同时指定不同的企业应用程序名称和 JMS 队列。每次运行脚本时,它将部署另一个消息驱动的 bean 并配置新的资源以使用指定的 JMS 队列。

要配置事件消息传递以使用外部 JMS 提供程序:

完成此任务需要执行的步骤

  1. 转至 $WAS_HOME/event/application 目录以获取用于定义想要配置缺省消息传递的 WebSphere ESB 运行时环境的概要文件。 (将 profile_path 替换为包含 WebSphere ESB 概要文件的目录。)
  2. 使用 wsadmin 命令来运行 event-message.jacl 脚本:
    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 脚本的参数如下所示:
    node_name
    WebSphere ESB 节点,将在其中部署消息传递应用程序。要确定节点名:
    1. 运行 profile_path/bin/setupCmdLine 脚本。
    2. 对于 Linux 或 UNIX 系统,运行 echo $WAS_NODE 命令,对于 Windows 系统,运行 echo %WAS_NODE% 命令。
    此值是区分大小写的。如果要在集群中部署应用程序,则省略此参数。
    server_name
    将在其中部署消息传递应用程序的 WebSphere 服务器。此值是区分大小写的。如果要在集群中部署应用程序,则省略此参数。
    cluster_name
    想要在其中部署消息传递应用程序的 WebSphere 集群。仅当要在集群中配置消息传递并且未指定节点和服务器时,才应指定此参数。
    注: 如果要使用 Cloudscape 事件数据库,则仅支持将集群用于测试用途(而不是生产环境)。
    app_name
    要用于消息传递企业应用程序的名称。此参数是必需的。
    queue
    将由消息传递企业应用程序使用的 JMS 队列的 JNDI 名称。此队列用于目标为事件服务器的异步消息传输。如果多次部署消息传递应用程序,则每次都必须指定不同 JMS 队列。
    connection_factory
    将由消息传递企业应用程序使用的 JMS 连接工厂的 JNDI 名称。
    listener_port
    将由消息传递企业应用程序使用的侦听器端口的名称。侦听器端口是在部署描述符中指定的。仅当消息传递应用程序使用侦听器端口时才应指定此参数。
    spec_name
    由消息传递企业应用程序使用的激活规范的 JNDI 名称。激活规范是在部署描述符中指定的。仅当消息传递应用程序使用应用程序规范时才应指定此参数。
    eventprofilescope
    要为事件消息传递创建的配置概要文件对象的作用域。此参数是可选的;如果指定作用域,则将在指定作用域中创建 JMS 传输概要文件和发射器工厂概要文件。有效值包括 cellnodeserver

    可选 -trace 参数会导致标准输出中显示其他调试信息。

    注:
    • 如果指定 event-message.ear 文件位置的标准路径,则确保路径中使用的是正斜杠(/),即使在 Windows 系统上也是如此。
    • 如果要在独立节点上部署消息传递应用程序,则指定可选 -conntype none 参数以按本地方式运行 wsadmin
    启动脚本后,系统将提示您输入 JMS 用户标识和密码。

任务主题

使用条款 | 评价此页

Timestamp icon上次更新时间: 3 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, 2006. All Rights Reserved.
本信息中心基于 Eclipse 技术。(http://www.eclipse.org)