MFT Agent properties for user exits
In addition to the standard properties in the agent.properties file, there are several advanced properties specifically for user exit routines. These properties are not included by default so if you want to use any of them, you must manually edit the agent.properties file. If you make a change to agent.properties file while that agent is running, stop and restart the agent to pick up the changes.
For IBM® WebSphere MQ Version 7.5 or later, there is the ability for environment variables to be used in some Managed File Transfer properties that represent file or directory locations. This allows the locations of files or directories used when running parts of the product, to vary depending on environment changes, such as which user is running the process. For more information, see The use of environment variables in MFT properties.
The user exit routines are called in the order listed.
Table 1. Agent properties for user exits Property name Description sourceTransferEndExitClasses Specifies a comma-separated list of classes that implement a source transfer end exit routine. sourceTransferStartExitClasses Specifies a comma-separated list of classes that implement a source transfer start exit routine. destinationTransferStartExitClasses Specifies a comma-separated list of classes that implement a destination transfer start user exit routine. destinationTransferEndExitClasses Specifies a comma-separated list of classes that implement a destination transfer user exit routine. exitClassPath Specifies a platform-specific, character-delimited list of directories that act as the class path for user exit routines. The agent's exit directory is searched before any entries in this class path.
If you are using this property on Windows, use a forward slash character (/) as a path delimiter, not the backslash character (\). For example:exitClassPath=C:/IBM/MQ/Java/lib/com.ibm.mqjms.jar; C:/IBM/MQ/Java/lib/com.ibm.mq.jarFor IBM WebSphere MQ Version 7.5 or later, the value of this property can contain environment variables.
exitNativeLibraryPath Specifies a platform-specific, character-delimited list of directories that act as the native library path for user exit routines. For IBM WebSphere MQ Version 7.5 or later, the value of this property can contain environment variables.
monitorExitClasses Specifies a comma-separated list of classes that implement a monitor exit routine. For more information, see MFT resource monitor user exits. protocolBridgeCredentialExitClasses Specifies a comma-separated list of classes that implement a protocol bridge credential user exit routine. For more information, see Mapping credentials for a file server by using exit classes. protocolBridgePropertiesExitClasses Specifies a comma-separated list of classes that implement a protocol bridge server properties user exit routine.
For more information, see ProtocolBridgePropertiesExit2: Looking up protocol file server properties.IOExitClasses Specifies a comma-separated list of classes that implement an I/O user exit routine. List only the classes that implement the IOExit interface, that is, do not list classes that implement the other I/O user exit interfaces, for example IOExitResourcePath and IOExitChannel. For more information, see Use MFT transfer I/O user exits.
Order of exit invocation
The source and destination exits are invoked in the following order:
- SourceTransferStartExit
- DestinationTransferStartExit
- DestinationTransferEndExit
- SourceTransferEndExit
Chaining source and destination exits
If you specify multiple exits, the first exit in the list is invoked first, followed by the second exit, and so on. Any changes made by the first exit are passed as input to the exit that is subsequently invoked and so on. For example, if the there are two source transfer start exits any changes made to the transfer metadata by the first exit are input to the second exit. Each exit returns its own result. If all the exits of a given type return PROCEED as a transfer result code, the overall result is PROCEED. If one or more exits return CANCEL_TRANSFER, the overall result is CANCEL_TRANSFER. All of the result codes and strings returned by the exits are output in the transfer log.
If the overall result from the source transfer start exit is PROCEED, the transfer proceeds using any changes made by the exits. If the overall result is CANCEL_TRANSFER, the source transfer end exits are invoked and then the transfer is canceled. The completion status in the transfer log is "cancelled".
If the overall result from the destination transfer start exits is PROCEED, the transfer proceeds using any changes made by the exits. If the overall result is CANCEL_TRANSFER, the destination transfer end exits are invoked, then the source transfer end exits are invoked. Finally the transfer is canceled. The completion status in the transfer log is "cancelled".
If a source or destination exit needs to pass information to following exits either in the chain or in the order of execution it must be done by updating the transfer metadata. The usage of the transfer metadata is exit implementation specific. For instance, if an exit sets the return result to CANCEL_TRANSFER and needs to communicate to the following exits that the transfer has been canceled it must done by setting a transfer metadata value in a way understood by the other exits.
Example
sourceTransferStartExitClasses=com.ibm.wmqfte.test.MFTTestSourceTransferStartExit sourceTransferEndExitClasses=com.ibm.wmqfte.test.MFTTestSourceTransferEndExit destinationTransferStartExitClasses=com.ibm.wmqfte.test.MFTTestDestinationTransferStartExit destinationTransferEndExitClasses=com.ibm.wmqfte.test.MFTTestDestinationTransferEndExit exitClassPath=C:/IBM/MQ/Java/lib/com.ibm.mqjms.jar;C:/IBM/MQ/Java/lib/com.ibm.mq.jar