title: JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()
body: <p>Using hibernate in my application, and everytime I do a transaction, I get this warning. It is spamming my logs.</p>
  
  <pre><code>JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()
  </code></pre>
  
  <p>I think it is caused by <code>hibernate.current_session_context_class</code>property. </p>
  
  <pre><code>&lt;hibernate-configuration&gt;
  &lt;session-factory&gt;
      &lt;property name="hibernate.connection.driver_class"&gt;net.sourceforge.jtds.jdbc.Driver&lt;/property&gt;
      &lt;property name="hibernate.connection.pool_size"&gt;5&lt;/property&gt;
      &lt;property name="show_sql"&gt;false&lt;/property&gt;
      &lt;property name="dialect"&gt;org.hibernate.dialect.SQLServerDialect&lt;/property&gt;
      &lt;property name="hibernate.current_session_context_class"&gt;jta&lt;/property&gt;
  
      &lt;mapping class="foo.bar.Class1" /&gt;
      &lt;mapping class="foo.bar.Class2" /&gt;
      &lt;mapping class="foo.bar.Class3" /&gt;
      &lt;mapping class="foo.bar.Class4" /&gt;
      &lt;mapping class="foo.bar.Class5" /&gt;
  &lt;/session-factory&gt;
  </code></pre>
  
  <p></p>
  
  <p>Is it something I should be worried about? If not, how can I stop the warning from appearing.</p>