Jboss ESB 捕获异常
我有一条消息是通过 HTTP 网关从 post 请求创建的。我真正想要的是一种方法,可以从 ESB 中的任何操作中捕获任何异常,并能够将其记录到数据库中。我在消息头中看到了一些有关设置错误的信息,但当消息来自 http 网关时,我找不到设置它的方法。另外,我不确定错误是执行此操作的最佳方法,因为某些操作会创建其他消息,而这些消息反过来也必须为它们设置错误。
I have a message is created from a post request through an HTTP gateway. What I'd really like is a way for any exception to be caught from any action in the ESB and be able to log it to a database. I saw some information on setting the fault to in the message header but I cannot find a way to set it when the message is coming from an http gateway. Also I'm not sure the fault to is the best way of doing this, since some actions create other messages which in turn would also have to have a fault to set for them.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种解决方案是使用 JBoss ESB 4.11 以来提供的全局操作管道拦截器功能,该功能允许您为所有服务配置全局拦截器,并拦截服务实例化、服务启动、服务结束和服务失败时的流程。
这里描述的是:
https://issues.jboss.org/browse/JBESB-3724
基本上你实现了接口“org.jboss.soa.esb.listeners.message.PipelineInterceptor”并在“jbossesb-properties.xml”中配置拦截点。
您可以配置多个不同的拦截器,并用逗号分隔。
One solution could be to use the global action pipeline interceptor feature available since JBoss ESB 4.11 which allows you to configure a global interceptor for all services and intercept the flow on service instantiation, service start, service end, and service failure.
It is described here:
https://issues.jboss.org/browse/JBESB-3724
Basically you implement the interface "org.jboss.soa.esb.listeners.message.PipelineInterceptor" and configure the interception point in "jbossesb-properties.xml".
You can configure several different interceptors separated by a comma.