/*
 * 
 * 
 */

package sample.ejbs;

import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import sample.ejb.entity.Customer;

/**
 *
 * @author Pablito
 */
@Stateless
public class NewSessionBean implements NewSessionBeanRemote, NewSessionBeanLocal {
    
    @PersistenceContext
    EntityManager em;
    
    @EJB
    OtherSessionBeanLocal other;

    @Override
    public List<Customer> getAllCustomers() {
        return em.createQuery("Select c From Customer c").getResultList();
    }

    @Override
    public List<Customer> getAllCustomersLocal() {
        return em.createQuery("Select c From Customer c").getResultList();
    }

 
}
