Hi,
I would like to expose services (classes that implement an interface called Service) using RMI. I can export them one by one using RmiServiceExporter, but in order to avoid bloating the XML config I'd like to have an auto-proxy creator that automatically creates an RMI service exporter for any bean implementing the Service interface.
The manual way:
How can this be replaced with a standard Spring auto proxy creating mechanism?Code:<!-- Service class --> class MyService1 implements Service { ... } <!-- Service config in Spring --> <bean id="MyService1Bean" class="mycompany.MyService1"/> <!-- Publish service using RMI --> <bean class="org.springframework.remoting.rmi.RmiServiceExporter"> <property name="serviceInterface" value="mycompany.MyService1" /> <property name="serviceName" value="MyService1" /> <property name="service" ref="MyService1Bean" /> </bean> (repeat this for each service)
Thanks,
Peter


Reply With Quote