Event Notification Service (ENS) 是基本的发布和订阅服务。ENS 起着分发程序的作用,Sun Java System 应用程序将它用作这些应用程序感兴趣的、某些类型事件的集合的中心点。事件是对资源的一个或多个属性的值所作的更改。任何要了解这些类型的事件何时发生的应用程序将使用 ENS 注册,ENS 按顺序标识事件,并使通知与订阅相匹配。
启动 Messaging Server 时,ENS 和 iBiff(用于 Messaging Server 的 ENS Publisher)被绑定在一起。默认情况下启用了 ENS,但是未装入 iBIFF。(请参见在 Messaging Server 中装入 ENS Publisher。)
要在 Messaging Server 中订阅通知,您需要在 Messaging Server 主机上装入 libibiff 文件,然后停止并重新启动 Messaging Server。
从命令行执行以下步骤。在这些步骤中,Messaging Server 安装目录的位置为 msg_svr_base,Messaging Server 用户为 inetuser。这些变量的典型值分别为 /opt/SUNWmsgsr 和 inetuser。
作为 inetuser 时,请运行 configutil 实用程序以装入 libibiff 文件。
cd msg_svr_base ./configutil -o "local.store.notifyplugin" -v "msg_svr_base/lib/libibiff" |
作为 root 时,请先停止然后重新启动 Messaging Server。
cd msg_svr_base /sbin
./stop-msg
./start-msg
现在准备通过 ENS 接收通知。请参见运行样例 Event Notification Service 程序