WebSphere MQ FTE中的退出与调用之间有什么区别? [英] What's the difference between an exit and a call in WebSphere MQ FTE?

查看:159
本文介绍了WebSphere MQ FTE中的退出与调用之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我被问了很多,所以我以为我会在这里发布问题并回答.

FTE出口与FTE呼叫之间有什么区别?它们是做什么用的,何时使用?

解决方案

背景
WebSphere MQ文件传输版(WMQ FTE)是基于WebSphere MQ构建的Java应用程序,它提供了企业文件传输平台.转移发生在两个代理之间,一个在源代理处,一个在目的地代理处.在传输的生命周期中,可以在四个点上调用外部代码-在传输在源代理和目标代理处开始之前,以及传输在源代理和目标代理处完成之后.调用外部代码的两种方法是退出和调用.

退出
出口作为Java类实现,并从代理代码中调用.它们的范围是每个代理的,一旦启用,每次传输都会调用出口.这使它们适合于执行全局策略或提供无处不在的服务,例如病毒扫描.

通话
调用在传输生命周期中作为(大多数)单独的任务实现,并且可以是Ant脚本或命令行可执行文件.这些在传输作业定义中定义,并且如果传输失败,则不会触发传输后调用.这使它们适合提供特定于传输的功能或取决于传输结果的功能.例如,转移后的目的地呼叫是执行解密的好地方,因为这通常是您为特定的转移定义的,并且如果转移失败,解密步骤将不会触发.

退出和致电的顺序
在源代理和目标代理上,在传输开始之前和传输完成之后都退出并调用fire.但是文档尚未显示调用和退出之间的关系.通过创建一组调用和退出来更新相同的日志文件,可以演示触发顺序.

以下是文件传输过程中退出点和调用的时间线.出口的名称与Java接口定义相同.调用的名称与用于传输定义的XML模式相同.

成功转移
2011年2月6日星期日,美国东部标准时间20:20:21:onSourceTransferStart退出被触发
2011年2月6日星期日,美国东部标准时间20:20:21:PreSourceCall被解雇了
2011年2月6日星期日,美国东部标准时间20:20:21:onDestinationTransferStart退出被触发
2011年2月6日星期日,美国东部标准时间20:20:21:PreDestinationCall被解雇
2011年2月6日星期日,美国东部标准时间20:20:22:onDestinationTransferEnd退出被触发
2011年2月6日星期日,美国东部标准时间20:20:22:PostDestinationCall被触发
2011年2月6日星期日,美国东部标准时间20:20:22:onSourceTransferEnd退出被触发
2011年2月6日星期日,美国东部标准时间20:20:22:触发了PostSourceCall

传输失败
2011年2月6日星期日,美国东部时间20:28:49:onSourceTransferStart退出被触发
2011年2月6日星期日,美国东部标准时间20:28:50:PreSourceCall被解雇了
2011年2月6日星期日,美国东部标准时间20:28:50:onDestinationTransferStart退出被触发
2011年2月6日星期日,美国东部标准时间20:28:50:PreDestinationCall被解雇
2011年2月6日星期日,美国东部标准时间20:28:50:onDestinationTransferEnd退出被触发
2011年2月6日星期日,美国东部标准时间20:28:50:onSourceTransferEnd退出被触发

其他资源
有关对WMQ FTE调用和出口进行编程的更多信息,请参见 WMQ FTE信息中心./p>

I have been asked this a lot lately so I thought I'd post the question and answer here.

What is the difference between an FTE exit and an FTE call? What are they for and when do I use them?

解决方案

Background
WebSphere MQ File Transfer Edition (WMQ FTE) is a Java application built on WebSphere MQ and which provides an enterprise file transfer platform. The transfer occurs between two agents, one at the source and one at the destination. In the lifecycle of the transfer there are four points at which external code can be called - before the transfer starts at both the source and the destination agents, and after the transfer completes at the source and destination agents. The two methods by which external code may be called are exits and calls.

Exits
Exits are implemented as Java classes and are called from the agent code. The scope of these is per-agent and once enabled, the exit is called for every transfer. This makes them appropriate for enforcing global policies or providing a ubiquitous service such as virus scanning.

Calls
Calls are implemented as (mostly) separate tasks in the transfer lifecycle and may be either an Ant script or a command-line executable. These are defined within the transfer job definition and the post-transfer calls will not fire if the transfer fails. This makes them suitable for providing functionality that is specific to a transfer or that depends on the outcome of the transfer. For example, a post-transfer destination call is a good place to perform decryption because this is something you would usually define for specific transfers and the decrypt step will not fire if the transfer fails.

Order of exits and calls
Exits and calls both fire before the transfer starts and after the transfer completes, at both the source and target agents. But the documentation does not yet show the relationship between calls and exits. By creating a set of calls and exits which update the same log file, it is possible to demonstrate the firing order.

Below is the timeline of exit points and calls during a file transfer. The names of the exits are as per the Java interface definition. The names of the calls are as per the XML schema for transfer definitions.

Successful transfer
Sun Feb 6 20:20:21 EST 2011: onSourceTransferStart Exit fired
Sun Feb 6 20:20:21 EST 2011: PreSourceCall fired
Sun Feb 6 20:20:21 EST 2011: onDestinationTransferStart Exit fired
Sun Feb 6 20:20:21 EST 2011: PreDestinationCall fired
Sun Feb 6 20:20:22 EST 2011: onDestinationTransferEnd Exit fired
Sun Feb 6 20:20:22 EST 2011: PostDestinationCall fired
Sun Feb 6 20:20:22 EST 2011: onSourceTransferEnd Exit fired
Sun Feb 6 20:20:22 EST 2011: PostSourceCall fired

Failed transfer
Sun Feb 6 20:28:49 EST 2011: onSourceTransferStart Exit fired
Sun Feb 6 20:28:50 EST 2011: PreSourceCall fired
Sun Feb 6 20:28:50 EST 2011: onDestinationTransferStart Exit fired
Sun Feb 6 20:28:50 EST 2011: PreDestinationCall fired
Sun Feb 6 20:28:50 EST 2011: onDestinationTransferEnd Exit fired
Sun Feb 6 20:28:50 EST 2011: onSourceTransferEnd Exit fired

Additional resources
For more information on programming WMQ FTE calls and exits, see the WMQ FTE Infocenter.

这篇关于WebSphere MQ FTE中的退出与调用之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆