此内容没有您所选择的语言版本。

17.6. Determine Location for Audit Assignment


In SwitchYard, you may choose to provide an argument to the @Audit annotation. The accepted values for this comes from org.switchyard.bus.camel.processors.Processors enumeration. For example, the following combination can handle only validation occurrences:
@Audit(Processors.VALIDATION)
Copy to Clipboard Toggle word wrap
Note the following important facts about validation, transformation, and transaction in SwitchYard:
  • The validation is executed twice for in-only exchanges and four times for in-out exchanges.
  • The validation occurs before and after transformation of inbound messages.
  • When SwitchYard sends outgoing messages, the validation occurs before and after transformation of outbound messages.
  • Transformation is executed once for in-only exchanges and twice for in-out exchanges.
  • Transaction phase is always executed twice.
If you want to implement only one execution of your auditor, use the following combination:
@Audit(Processors.PROVIDER_CALLBACK).
Copy to Clipboard Toggle word wrap
Here, the auditor is executed just before sending exchange to service implementation. You can also implement one auditor instance with few mediation steps. For example, a bean with annotation following:
@Audit({Processors.PROVIDER_CALLBACK, Processors.CONSUMER_CALLBACK})
Copy to Clipboard Toggle word wrap
This bean is executed twice. One pair of before or after call for provider service and second pair for outgoing response.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat