Nivi,

The easiest way to use this type of route, is by using a ProxyHelper
to create a proxy for you target RMI service that uses the
'inputEndpoint' to send exchanges to the target endpoint over RMI.
Have a look at the source code for the unit tests in
http://svn.eu.apache.org/viewvc/camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java.

The RMI endpoint takes care of the naming call you mentioned as well
as some other RMI internals.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/2/17 Nivetha Shri <[email protected]>:
> Hi All
> Can someone tell me how to use RMI component in Camel?
>
> It is given tat we can hit the rmi service as follows..
> from(inputEndPoint).to("rmi://localhost:1099/foo")
>
> I have bound the service as follows
>
> MyImpl obj = new MyImpl (); Naming.rebind("//localhost:1099/foo", obj);
>
> Usually, in a normal client we will invoke the rmi service as follows
> Hello obj = (Hello)Naming.lookup("//localhost:1099/foo");
> message = obj.myMethod();
>
> i.e., we would get the object from the bindings and then invoke the methods
> that we do need.
>
> How can we achieve the same from camel? Any pointers to articles on this?
>
> Any help would be of great use.
>
> Thanks and Regards
> Nivi
>

Reply via email to