Using hibernate in my application, and everytime I do a transaction, I get this warning. It is spamming my logs.
JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()
I think it is caused by hibernate.current_session_context_class
property.
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
<property name="hibernate.connection.pool_size">5</property>
<property name="show_sql">false</property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="hibernate.current_session_context_class">jta</property>
<mapping class="foo.bar.Class1" />
<mapping class="foo.bar.Class2" />
<mapping class="foo.bar.Class3" />
<mapping class="foo.bar.Class4" />
<mapping class="foo.bar.Class5" />
</session-factory>
Is it something I should be worried about? If not, how can I stop the warning from appearing.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…