284.4. 사용
RMI 레지스트리에 등록된 기존 RMI 서비스를 호출하려면 다음과 유사한 경로를 생성합니다.
from("pojo:foo").to("rmi://localhost:1099/foo");
from("pojo:foo").to("rmi://localhost:1099/foo");
RMI 레지스트리에서 기존 camel 프로세서 또는 서비스를 바인딩하려면 다음과 같이 RMI 끝점을 정의합니다.
RmiEndpoint endpoint= (RmiEndpoint) endpoint("rmi://localhost:1099/bar");
endpoint.setRemoteInterfaces(ISay.class);
from(endpoint).to("pojo:bar");
RmiEndpoint endpoint= (RmiEndpoint) endpoint("rmi://localhost:1099/bar");
endpoint.setRemoteInterfaces(ISay.class);
from(endpoint).to("pojo:bar");
					RMI 소비자 엔드포인트를 바인딩할 때 노출된 원격 인터페이스를 지정해야 합니다.
				
XML DSL에서는 Camel 2.7 이상에서 다음과 같이 수행할 수 있습니다.
    <camel:route>
        <from uri="rmi://localhost:37541/helloServiceBean?remoteInterfaces=org.apache.camel.example.osgi.HelloService"/>
        <to uri="bean:helloServiceBean"/>
    </camel:route>
    <camel:route>
        <from uri="rmi://localhost:37541/helloServiceBean?remoteInterfaces=org.apache.camel.example.osgi.HelloService"/>
        <to uri="bean:helloServiceBean"/>
    </camel:route>