title: Invoking a remote Camel through RMI
body: <p>I have two instances of the same Camel-using web application deployed on two separate servers.
  Only instance A will receive certain external event notifications. I need to somehow inform instance B of this.</p>
  
  <p>So far, I tried registering the route as follows:</p>
  
  <pre><code>RmiEndpoint endpoint= (RmiEndpoint) endpoint("rmi://remotehost:1199/foo");
  endpoint.setRemoteInterfaces(Junki.class);
  from(endpoint).to("bean:bar");
  </code></pre>
  
  <p>and another route like this:</p>
  
  <pre><code>&lt;route&gt;
      &lt;from uri="direct:rmi"/&gt;
      &lt;to uri="rmi://remotehost:1199/foo"/&gt;
  &lt;/route&gt;
  </code></pre>
  
  <p>hoping that this will allow to invoke a method on bean <em>bar</em> on the remote server by sending messages to the local <em>direct:rmi</em>. when I try running this, I get no exceptions, but no effect either. The Camel examples on the site are horrible, referring to inexistent URI schemas and showing everything completely out of context, so I couldn't learn much from there. Yet, the little that they do explain is done exactly as above.</p>