-
Jan 16th, 2011, 07:58 PM
#1
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
-
Mar 26th, 2012, 10:43 AM
#2
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules