Announcement Announcement Module
Collapse
No announcement yet.
How does the serviceInterface get injected to RMIClient Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Hi, you can download STS (Springsource tool suite) and debug the code, Maven will download automatically the source code to inspect.

    Comment

    Working...
    X