I happen to find examples that uses this construct though I am not sure what can I get from this?
Does it means that all select statements in a stateless EJB should follow this?
@Stateless
public class EmployeeFacade {
@PersistenceContext(unitName="EmployeeService")
EntityManager em;
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public List<Department> findAllEmployees() {
return em.createQuery("SELECT e FROM Employee e",
Employee.class)
.getResultList();
}
What do I get from this?
Thanks.