title: Find working without transaction in JTA
body: <p>i'm studying JTA and i tried make a find example to test my concept:</p>
  
  <p>First a created a class with CDI injeting my DAO:</p>
  
  <pre><code>@Named
  @RequestScoped
  public class SegurancaServiceJTA {
  
      @Inject
      private DAOSeguranca daoSeguranca;
  
      @Transactional(value = Transactional.TxType.NEVER)
      public void findTest(){
          List result = daoSeguranca.findList("SELECT u FROM Usuario u",null);
      }
  
  }
  </code></pre>
  
  <p>Inside my DAO i'm injeting my EntityManager with @PersistenceContext annotation. </p>
  
  <pre><code>public class DAOSeguranca implements IDAO, Serializable {
      @PersistenceContext(unitName = "seguranca")
      private EntityManager em;
  
       @SuppressWarnings({"unchecked", "rawtypes"})
      public List findList(String hql, Map&lt;String, Object&gt; namedParams, Integer first,
                                                     Integer maxResult, Class qualifier, boolean buscarTodos) {
          try {
              logger.debug("Executando findList. HQL = " + hql);
              Query query = em.createQuery(hql);
              configureParams(namedParams, query);
  
              if (first != null) {
                  query.setFirstResult(first);
              }
  
              if (maxResult != null) {
                  query.setMaxResults(maxResult);
              } else if (!buscarTodos) {
                  query.setMaxResults(100);
              }
  
              return query.getResultList();
          } catch (Exception e) {
              logger.error(e);
              throw new DAOException(e.getMessage());
          }
      }
  }
  </code></pre>
  
  <p>My doubt are:</p>
  
  <p>1) I understand that this method should not work because entityManager can find anything without a transaction, and i'm using TxType.NEVER to force error. But this method works normal and return the beans.</p>
  
  <p>2) In my persistence.xml i'm using JTA, but if i put RESOURCE_LOCAL everything continue working. So, this is right ? I understand that JTA should work only with JTA in persistence.xml and not RESOURCE_LOCAL.</p>