Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor copy edits

RMI Component

The rmi: component bind the binds PojoExchanges to the RMI protocol (JRMP).

Since this binding is just using RMI, normal RMI rules still apply in regards to regarding what the methods can be used over itinvoked. This component supports only supports PojoExchanges that carry a method invocation that is part of from an interface that extends the Remote interface. All parameters in the method should be either Serializable or Remote objects too.

URI format

Code Block
rmi://rmi-regisitry-host:rmi-registry-port/registry-path[?options]

For example:

Code Block
rmi://localhost:1099/path/to/service

You can append query options to the URI in the following format, ?option=value&option=value&...

Options

Name

Default Value

Description

method

null

As of Camel 1.3, you can set the name of the method to invoke.

Using

To call out to an existing RMI service registered in an RMI registry, create a Route route similar to the following:

Code Block
java
java
from("pojo:foo").to("rmi://localhost:1099/foo");

To bind an existing camel processor or service in an RMI registry, create a Route likedefine an RMI endpoint as follows:

Code Block
java
java
RmiEndpoint endpoint= (RmiEndpoint) endpoint("rmi://localhost:1099/bar");
endpoint.setRemoteInterfaces(ISay.class);
from(endpoint).to("pojo:bar");

Notice Note that when binding an inbound RMI consumer endpoint, you must specify the Remote interfaces exposed must be specified.

Options

...

Name

...

Default Value

...

Description

...

method

...

null

...

.

...

Include Page
CAMEL:Endpoint See Also
CAMEL:Endpoint See Also