Jan 16th, 2011, 07:58 PM
How does the serviceInterface get injected to RMIClient
The following snippet describes how the service interface is injected into RMIClient :
<bean id="employeeClient" class="spring.rnd.remoting.rmi.EmployeeRemoteClien t">
<property name="employeeService" ref="employeeService"/>
<bean id="employeeService" class="org.springframework.remoting.rmi.RmiProxyFa ctoryBean">
<property name="serviceUrl" value="rmi://localhost:1199/EmployeeService"/>
<property name="serviceInterface" value="spring.rnd.remoting.rmi.EmployeeService"/>
The perplexing part is how is the reference of type RmiProxyFactoryBean get assigned to the type ServiceInterface injected into the RMIClient ?
More surprizing when this instance gets extracted on the client side we cannot cast it to RmiProxyFactoryBean . So what is the magic behind the scenes ? I know the details doesn't affect implementation but just for curiosity want to understand it .
Mar 26th, 2012, 10:43 AM
Hi, you can download STS (Springsource tool suite) and debug the code, Maven will download automatically the source code to inspect.
Tags for this Thread