package inventory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter;

import com.atomikos.remoting.spring.httpinvoker.TransactionalHttpInvokerServiceExporter;

@Configuration
public class HttpExporter {

	
	@Autowired
	InventoryService inventoryService;

	@Bean(name = "/inventory")
	HttpInvokerServiceExporter paymentServiceServiceExporter() {
		TransactionalHttpInvokerServiceExporter exporter = new TransactionalHttpInvokerServiceExporter();
		exporter.setService(inventoryService);
		exporter.setServiceInterface(InventoryService.class);
		return exporter;
	}
	
}
