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 V7.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 IBM MQ Managed File Transfer properties.

User exit routine properties

The user exit routines are called in the order listed in the following table. For more information about the agent.properties file, see Advanced agent properties: User exit routine.

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 end 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 exits 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:/mycomp/mqft/exits/encryptFileExit.jar;
C:/mycomp/mqft/exits/fileFilter.jar. 

For IBM WebSphere MQ V7.5, or later, the value of this property can contain environment variables.

For a IBM 4690 system this property can contain logical names, but the directory must be located on the F: drive.

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 V7.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 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 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 Looking up protocol file server properties by using exit classes (ProtocolBridgePropertiesExit2).
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 Using IBM MQ Managed File Transfer transfer I/O user exits.

Order of exit invocation

The source and destination exits are invoked in the following order:
  1. SourceTransferStartExit
  2. DestinationTransferStartExit
  3. DestinationTransferEndExit
  4. 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:/mycomp/mqft/exits/encryptFileExit.jar;C:/mycomp/mqft/exits/fileFilter.jar