Customizing WebSphere MQ File Transfer Edition with user exit routines

You can customize the features of WebSphere® MQ File Transfer Edition by using your own programs known as user exit routines.

WebSphere MQ File Transfer Edition provides points in the code where WebSphere MQ File Transfer Edition can pass control to a program that you have written (a user exit routine). These points are known as user exit points. WebSphere MQ File Transfer Edition can then resume control when your program has finished its work. You do not have to use any of the user exits, but they are useful if you want to extend and customize the function of your WebSphere MQ File Transfer Edition system to meet your specific requirements.

There are two points during file transfer processing where you can invoke a user exit at the source system and two points during file transfer processing where you can invoke a user exit at the destination system. The following table summarizes each of these user exit points and the Java™ interface that you must implement to use the exit points.
Table 1. Summary of source-side and destination-side exit points and Java interfaces
Exit point Java interface to implement
Source-side exit points:
Before the entire file transfer starts SourceTransferStartExit.java
After the entire file transfer is complete SourceTransferEndExit.java
Destination-side exit points:
Before the entire file transfer starts DestinationTransferStartExit.java
After the entire file transfer is complete DestinationTransferEndExit.java
The user exits are invoked in the following order:
  1. SourceTransferStartExit
  2. DestinationTransferStartExit
  3. DestinationTransferEndExit
  4. SourceTransferEndExit
Changes made by the SourceTransferStartExit and DestinationTransferStartExit exits are propagated as input to subsequent exits. For example if the SourceTransferStartExit exit modifies the transfer metadata, the changes are reflected in the input transfer metadata to the other exits.

Building your user exit

The interfaces to build a user exit are contained in WMQFTE_install_directory/lib/com.ibm.wmqfte.exitroutines.api.jar. You must include this .jar file in the class path when you build your exit. To run the exit, extract the exit as a .jar file and place this .jar file in a directory as described in the following section.

User exit locations

You can store your user exit routines in two possible locations:
  • The exits directory. There is an exits directory under each agent directory. For example: C:\Program Files\IBM\WMQFTE\config\QM_JUPITER\agents\AGENT1\exits
  • You can set the exitClassPath property to specify an alternative location. If there are exit classes in both the exits directory and the class path set by exitClassPath, the classes in the exits directory take priority, which means that if there are classes in both locations with the same name, the classes in the exits directory take priority.

Configuring an agent to use user exits

There are four agent properties that can be set to specify the user exits that an agent invokes. These agent properties are sourceTransferStartExitClasses, sourceTransferEndExitClasses, destinationTransferStartExitClasses, and destinationTransferEndExitClasses. For information about how to use these properties, see Agent properties for user exits.

Running user exits on protocol bridge agents

If you run user exits on a protocol bridge agent, the exits have access to only the system where the bridge agent is located. The exits do not have direct access to the files on the FTP or SFTP server.

Running user exits on Connect:Direct bridge agents

You cannot run user exits on Connect:Direct® bridge agents.

Concept Concept

Feedback

Timestamp icon Last updated: Tuesday, 30 January 2018
http://www.ibm.com/support/knowledgecenter/SSEP7X_7.0.4/com.ibm.wmqfte.doc/user_exits.htm