RMIPage edited by willem jiangRMI ComponentThe rmi: component binds PojoExchanges to the RMI protocol (JRMP). Since this binding is just using RMI, normal RMI rules still apply regarding what methods can be invoked. This component supports only PojoExchanges that carry a method invocation from an interface that extends the Remote interface. All parameters in the method should be either Serializable or Remote objects. Maven users will need to add the following dependency to their pom.xml for this component: <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-rmi</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency>
UsingTo call out to an existing RMI service registered in an RMI registry, create a route similar to the following: from("pojo:foo").to("rmi://localhost:1099/foo"); To bind an existing camel processor or service in an RMI registry, define an RMI endpoint as follows: RmiEndpoint endpoint= (RmiEndpoint) endpoint("rmi://localhost:1099/bar"); endpoint.setRemoteInterfaces(ISay.class); from(endpoint).to("pojo:bar"); Note that when binding an RMI consumer endpoint, you must specify the Remote interfaces exposed. See Also
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|