package payment;

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
	PaymentService paymentService;
	
	@Bean(name = "/payment") 
	HttpInvokerServiceExporter paymentServiceServiceExporter() {
		TransactionalHttpInvokerServiceExporter exporter = new TransactionalHttpInvokerServiceExporter();
        exporter.setService( paymentService );
        exporter.setServiceInterface( PaymentService.class );
        return exporter;
    }
	
}
