package devopsdistilled.operp.client.context;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.rmi.RmiProxyFactoryBean;

import devopsdistilled.operp.server.data.service.items.ItemService;

@Configuration
public class RmiContext {
	
	@Bean
	public RmiProxyFactoryBean itemService() {
		RmiProxyFactoryBean rmiProxy = new RmiProxyFactoryBean();
		rmiProxy.setServiceUrl("rmi://127.0.1.1:1099/ItemService");
		rmiProxy.setServiceInterface(ItemService.class);
		return rmiProxy;
	}
}

@@ -270,20 +270,160 @@
 e.items.
-Item
+BrandService;%0Aimport devopsdistilled.operp.server.data.service.items.ItemService;%0Aimport devopsdistilled.operp.server.data.service.items.Product
 Service;
@@ -469,10 +469,9 @@
 t %7B%0A
-%09
 %0A
+
 %09@Be
@@ -639,16 +639,16 @@
 vice%22);%0A
-
 %09%09rmiPro
@@ -711,11 +711,517 @@
 roxy;%0A%09%7D
+%0A%0A%09@Bean%0A%09public RmiProxyFactoryBean productService() %7B%0A%09%09RmiProxyFactoryBean rmiProxy = new RmiProxyFactoryBean();%0A%09%09rmiProxy.setServiceUrl(%22rmi://127.0.1.1:1099/ProductService%22);%0A%09%09rmiProxy.setServiceInterface(ProductService.class);%0A%09%09return rmiProxy;%0A%09%7D%0A%0A%09@Bean%0A%09public RmiProxyFactoryBean brandService() %7B%0A%09%09RmiProxyFactoryBean rmiProxy = new RmiProxyFactoryBean();%0A%09%09rmiProxy.setServiceUrl(%22rmi://127.0.1.1:1099/BrandService%22);%0A%09%09rmiProxy.setServiceInterface(BrandService.class);%0A%09%09return rmiProxy;%0A%09%7D
 %0A%7D%0A

Configure RmiProxy Bean for Product and Brand