package eo.ejb.service;

import javax.inject.Inject;
import javax.ejb.EJB;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;

public class OrderService {
    @Inject
    private PaymentGateway paymentGateway;

    @EJB
    private InventoryService inventory;

    @Autowired
    private NotificationService notificationService;

    @Resource
    private DataSource dataSource;

    public void placeOrder() {
        paymentGateway.charge();
        inventory.reserve();
        notificationService.notify();
    }
}