package provider;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Stateless
public class EntityProviderBean implements EntityProvider {

    // If this is missing (although not used) it behaves as pojo.
    @PersistenceContext(unitName = "PersistenceUnit")
    private EntityManager entityManager;

    public Entity service() {
        Entity entity = new Entity();
        entity.setId(1l);
        return entity;
    }
}
