Results 1 to 2 of 2

Thread: How does the serviceInterface get injected to RMIClient

  1. #1
    Join Date
    Jan 2011
    Posts
    1

    Default 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. #2
    Join Date
    May 2011
    Location
    Madrid (Spain)
    Posts
    101

    Default

    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
  •