ProtocolBridgePropertiesExit2: Looking up protocol file server properties
If you have a large number of protocol file servers, you can implement the
com.ibm.wmqfte.exitroutine.api.ProtocolBridgePropertiesExit2
interface to look up
protocol file server properties that are referenced in transfers. You can implement this interface
in preference to maintaining a ProtocolBridgeProperties.xml file. Managed File Transfer provides a sample user exit that looks up protocol file
server properties.
Configuring user exits that look up protocol bridge properties
About this task
Any user exit that looks up protocol bridge properties
must implement the interface com.ibm.wmqfte.exitroutine.api.ProtocolBridgePropertiesExit2
.
For more information, see ProtocolBridgePropertiesExit2.java interface.
You
can chain multiple protocol server properties exits together in a
similar manner to other user exits. The exits are called in the order
that they are specified in using the protocolBridgePropertiesExitClasses
property
in the agent properties file. The initialize methods all return separately
and if one or more returns a value of false, the agent does not start.
The error is reported in the agent event log.
Only one overall result is returned for the getProtocolServerProperties methods of all of the exits. If the method returns a properties object as the result code, this value is the returned result and the getProtocolServerProperties methods of the subsequent exits are not called. If the method returns a value of null as the result code, the getProtocolServerProperties method of the next exit is called. If there is no subsequent exit, the null result is returned. An overall result code of null is considered as a lookup failure by the protocol bridge agent.
You are recommended to use the ProtocolBridgePropertiesExit2.java interface, but for information about the ProtocolBridgePropertiesExit.java interface, see ProtocolBridgePropertiesExit: Looking up protocol file server properties.
To run your exit, complete the following steps:
Procedure
- Compile the protocol server properties user exit.
- Create a Java archive (JAR) file containing the compiled exit and its package structure.
- Put the JAR file containing the exit class in the exits directory of the protocol bridge agent . This directory is found in the MQ_DATA_PATH/mqft/config/coordination_queue_manager/agents/bridge_agent_name directory.
- Edit the property file of the protocol bridge agent to
include the property
protocolBridgePropertiesExitClasses
. For the value of this property, specify a comma-separated list of classes that implement a protocol bridge server properties user exit. The exit classes are called in the order that they are specified in this list. For more information, see The MFT agent.properties file. - You can optionally specify the
protocolBridgePropertiesConfiguration
property. The value you specify for this property is passed in as a String to the initialize() method of the exit classes specified byprotocolBridgePropertiesExitClasses
. For more information, see The MFT agent.properties file.
Using the sample user exit
About this task
A sample user exit that looks up protocol bridge properties is provided in the MQ_INSTALLATION_PATH/mqft/samples/protocolBridge directory and in the topic Sample protocol bridge properties user exit.
serverName=type://host:port
The
location of the properties file is taken from the protocol bridge
agent property protocolBridgePropertiesConfiguration
.To run the sample user exit, complete the following steps: