20.4 RMI namespace support

To configure the inbound gateway you can choose to use the namespace support for it. The following code snippet shows the different configuration options that are supported.

 <rmi:inbound-gateway id="gatewayWithDefaults" request-channel="testChannel"/>

 <rmi:inbound-gateway id="gatewayWithCustomProperties" request-channel="testChannel"
                      expect-reply="false" request-timeout="123" reply-timeout="456"/>

 <rmi:inbound-gateway id="gatewayWithHost" request-channel="testChannel"
                      registry-host="localhost"/>

 <rmi:inbound-gateway id="gatewayWithPort" request-channel="testChannel"
                      registry-port="1234"/>

 <rmi:inbound-gateway id="gatewayWithExecutorRef" request-channel="testChannel"
                      remote-invocation-executor="invocationExecutor"/>

To configure the outbound gateway you can use the namespace support as well. The following code snippet shows the different configuration for an outbound rmi gateway.

 <rmi:outbound-gateway id="gateway"
                       request-channel="localChannel"
                       remote-channel="testChannel"
                       host="localhost"/>