Skip to content

Allow configuring auto-join transaction globally #2214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

fredericDelaporte
Copy link
Member

For application willing to enlist in current system transaction only explicitly, it would be better to be able to configure the auto-join transaction option globally rather than at each session opening.

This PR add the option as a configuration option.

Disabling auto-join may improve performance for applications which are not using transaction scopes, or which are using them seldom and takes care of re-enabling auto-join or joining explicitly in those cases.

hazzik
hazzik previously approved these changes Sep 15, 2019
@hazzik hazzik added this to the 5.3 milestone Sep 15, 2019
{
Assert.That(
s.GetSessionImplementation().TransactionContext,
_autoJoinTransaction != false ? Is.Not.Null : Is.Null);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Granted, I should care more about avoiding negating.

@fredericDelaporte fredericDelaporte merged commit 1c779fa into nhibernate:master Sep 16, 2019
@fredericDelaporte fredericDelaporte deleted the config-join-trans branch September 16, 2019 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants