title: HibernateException:Current Transaction is not in progress on Wildfly 10 after migrating to Hibernate 5
body: <p>I am running Hibernate 5 on EJB3 and wildfly 10 some requests fail on first Hibernate call with </p>
  
  <pre><code>org.hibernate.HibernateException: Current transaction is not in progress 
  </code></pre>
  
  <p>when I am trying to call <code>sessionFactory().getCurrentSession()</code> method.
  (Using <strong>JTATransactionManager</strong> to manage transaction in <strong>hibernate.cfg.xml</strong>)</p>