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.
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 |
- SourceTransferStartExit
- DestinationTransferStartExit
- DestinationTransferEndExit
- SourceTransferEndExit
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
- 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.