Spring RMI using (Remote Method Invocation) WorkFlow:-
In this Topic we provide the Spring Remoting using RMI with workflow. Spring creates a proxy that represents the actual remote bean. The proxy is created using RmiProxyFactoryBean. The proxy can be used as a normal Spring bean and the client code does not need to know that it is actually calling a remote method.
The important classes
class will be used by the client to create a proxy to connect to the remote
service. This is a spring FactoryBean for creating RMI proxies. The
proxied service is use a spring bean using the interface specified in the
ServiceInterface property. The Remote service URL can be specified by the
serviceUrl property. org.springframework.remoting.rmi.RmiServiceExporter
- This class will be used by the server to create a remote service.
There are following steps to explain the diagram as follows:
1 Client sends a message call.
2 This message call is handled by an RMI Proxy created by RmiProxyFactoryBean.
3 The RMI Proxy converts the call into a remote call over JRMP (Java Remote Method Protocol).
4 The RMI Service Adapter created by RmiServiceExporter intercepts the remote call over JRMP.
5 It forwards the method call to Service.