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>
<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"/>
</bean>
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 .
Thanks
Debashish