![[z/OS]](../images/ngzos.gif)
通过在 ASF 方式下将 IBM MQ 用作消息传递提供程序,在 z/OS 上调整消息驱动的 Bean 处理
如果正在 z/OS® 平台上运行 WebSphere® Application Server(其中 IBM MQ 是消息传递提供程序,并且已按应用程序服务器工具 (ASF) 方式部署消息驱动的 Bean),可调整消息驱动的 Bean 处理。
开始之前
要调整消息驱动的 Bean 处理,需要考虑各种设置配合使用。可考虑使用许多不同的值和可能性,因为各种工作负载都可在任何给定服务器上运行。
当消息驱动的 Bean 映射(即侦听)至队列或映射至主题(通过持久预订)时,JMS 消息首先会进入应用程序服务器中的控制器,所以我们说该服务器“在控制器中侦听”这些消息。在有关调整消息驱动的 Bean 处理的描述中,通篇使用了“在控制器中侦听”这一术语。
关于此任务
如果在服务器中调整消息驱动的 Bean 处理,那么还需要考虑调整服务器的整个工作负载及两者之间的交互。
- WLM 服务类定义
- WebSphere Application Server 工作负载概要文件选择
- 消息侦听器服务侦听器端口设置
- JMS 连接工厂池设置
- IBM MQ 队列管理器设置
- 消息驱动的 Bean 的数目。
- 管理配置选项,例如是将两个消息驱动的 Bean 映射至同一个侦听器端口还是映射至不同的侦听器端口。
- 消息驱动的 Bean 的工作重要性,与服务器中运行的其他(HTTP 和 IIOP)工作类型相比。
以下建议设置提供了一个起点,假定仅对服务器配置了一个应用程序,该应用程序由已在此服务器上安装并正在运行的单个消息驱动的 Bean 组成。
z/OS 上的“在控制器中侦听”案例中较详细地讨论描述了建议背后的理由,并较详细地描述了侦听器端口功能。它们共同帮助您为自己的系统和服务器选择设置。
过程
示例
- If your server is configured with the maximum server
instances value set to 3, (whatever
the minimum number might be), and if your workload profile is LONGWAIT (which means that each servant contains 40 worker
threads), set your listener port maximum sessions value to at least
240 = 2 * 3 * 40
- Suppose that your application contains two individual message-driven
beans, each of which has an onMessage() implementation that forwards
the message to another JMS destination. Therefore, each message-driven
bean needs its own JMS connection factory to complete this task. Suppose
the Administrator has mapped each message-driven bean JMS connection
factory resource reference onto the same administratively-defined
connection factory used by the listener port that each of these message-driven
beans is mapped onto.
In this case, you need to set the connection factory Connection Pool Max Connections value to 42. One connection for each of the two message-driven beans to be used by the listener port, and one connection potentially for each of the 40 onMessage() dispatches that night be running concurrently. (Remember that the connection pool is a per-servant pool).
- Set the connection factory Session Pool Max Connections to 40, the number of worker threads in a single servant, regardless of the number of servants.
For debugging tips, refer to 优化 MDB 调速支持以在 z/OS 中进行调试.