@@ -644,16 +644,22 @@ finally
644
644
<listitem >
645
645
<para >
646
646
As of NHibernate v5.0, <literal >FlushMode.Commit</literal > requires the configuration setting
647
- <literal >transaction.use_connection_on_system_events </literal > to be true for flushing
647
+ <literal >transaction.use_connection_on_system_prepare </literal > to be true for flushing
648
648
from transaction scope commit. Otherwise, it will be your responsibility to flush the session
649
649
before completing the scope.
650
650
</para >
651
651
<para >
652
- Using <literal >transaction.use_connection_on_system_events </literal > can cause undesired
652
+ Using <literal >transaction.use_connection_on_system_prepare </literal > can cause undesired
653
653
transaction promotions to distributed: it requires using a dedicated connection for flushing,
654
654
and it delays session disposal (if done inside the scope) to the scope disposal. If you want
655
655
to avoid this, set this setting to <literal >false</literal > and manually flush your sessions.
656
656
</para >
657
+ <para >
658
+ For new applications, it is recommended to set
659
+ <literal >transaction.use_connection_on_system_prepare</literal > to <literal >false</literal >,
660
+ and to flush explicitly your sessions before scope completion. For old applications, consider
661
+ checking how sessions are flushed, and if possible switch it to <literal >false</literal > too.
662
+ </para >
657
663
</listitem >
658
664
<listitem >
659
665
<para >
@@ -669,7 +675,7 @@ finally
669
675
<literal >Reconnect()</literal > before re-using the session.)
670
676
</para >
671
677
<para >
672
- When using <literal >transaction.use_connection_on_system_events </literal >, if the session is
678
+ When using <literal >transaction.use_connection_on_system_prepare </literal >, if the session is
673
679
disposed within the scope, the connection releasing will still occurs from transaction
674
680
completion event.
675
681
</para >
@@ -678,7 +684,7 @@ finally
678
684
<para >
679
685
As of NHibernate v5.0, using transaction scope and trying to use the session connection within
680
686
<literal >AfterTransactionCompletion</literal > is forbidden and will raise an exception.
681
- If the setting <literal >transaction.use_connection_on_system_events </literal >
687
+ If the setting <literal >transaction.use_connection_on_system_prepare </literal >
682
688
is <literal >false</literal >, it will forbid any connection usage from
683
689
<literal >BeforeTransactionCompletion</literal > event too, when this event is triggered by
684
690
a transaction scope commit or rollback.
0 commit comments