Notifier クラス設定は NotificationList 要素を定義するために使用されます。これは NotificationTargets のリストを指定するために使用できます。"ok" タイプの NotificationList は、アクションパイプライン処理が正常に実行されると通知を受信するターゲットを指定します。err タイプの NotificationList は、前述のアクションパイプライン処理セマンティクスに従って、例外アクションパイプライン処理時に通知を受信するターゲットを指定します。"err" と "ok" はいずれも大文字と小文字を区別しません。
NotificationTarget に送信される通知はターゲット固有ですが、基本的にはアクションパイプライン処理が行われるメッセージのコピーで設定されます。通知ターゲットタイプとそのパラメーターがこのセクションの最後に表示されます。
アクション処理パイプラインの各ステップで成功または失敗を通知するには、Notifier クラスを使用する <action> を含めるのではなく、各 <action> 要素に "okMethod" 属性および "exceptionMethod" 属性を使用します。
<action name="notify" class="org.jboss.soa.esb.actions.Notifier" okMethod="notifyOK">
<property name="destinations">
<NotificationList type="OK">
<target class="NotifyConsole" />
<target class="NotifyFiles" >
<file name="@results.dir@/goodresult.log" />
</target>
</NotificationList>
<NotificationList type="err">
<target class="NotifyConsole" />
<target class="NotifyFiles" >
<file name="@results.dir@/badresult.log" />
</target>
</NotificationList>
</property>
</action>
<action name="notify" class="org.jboss.soa.esb.actions.Notifier" okMethod="notifyOK">
<property name="destinations">
<NotificationList type="OK">
<target class="NotifyConsole" />
<target class="NotifyFiles" >
<file name="@results.dir@/goodresult.log" />
</target>
</NotificationList>
<NotificationList type="err">
<target class="NotifyConsole" />
<target class="NotifyFiles" >
<file name="@results.dir@/badresult.log" />
</target>
</NotificationList>
</property>
</action>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow