-
Notifications
You must be signed in to change notification settings - Fork 934
NH-3606 - open a stateless session from a session #1520
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
fredericDelaporte
merged 9 commits into
nhibernate:master
from
fredericDelaporte:NH-3606
Mar 11, 2018
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6ac5fa0
NH-3606 - open a stateless session from a session
fredericDelaporte 875f28d
Minimal move of duplicated code.
fredericDelaporte 51b6ee8
Additional move of duplicated code.
fredericDelaporte e11c333
Move in common overrides duplicated since connection manager own move.
fredericDelaporte 3e6da46
Move in common a property duplicated since connection manager own move.
fredericDelaporte 683f3af
Move in common a property with an undue discrepancy.
fredericDelaporte cc2d431
Trivial additional clean-up.
fredericDelaporte 30d8fe2
Rename a property for consistency.
fredericDelaporte 7e468e8
Merge branch 'master' into NH-3606
fredericDelaporte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -274,8 +274,16 @@ public partial interface ISessionImplementor | |
bool IsOpen { get; } | ||
|
||
/// <summary> | ||
/// Is the <c>ISession</c> currently connected? | ||
/// Is the session connected? | ||
/// </summary> | ||
/// <value> | ||
/// <see langword="true" /> if the session is connected. | ||
/// </value> | ||
/// <remarks> | ||
/// A session is considered connected if there is a <see cref="DbConnection"/> (regardless | ||
/// of its state) or if the field <c>connect</c> is true. Meaning that it will connect | ||
/// at the next operation that requires a connection. | ||
/// </remarks> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This property concrete implementation being put in common, I have taken the more complete xml documentation. |
||
bool IsConnected { get; } | ||
|
||
FlushMode FlushMode { get; set; } | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not added the equivalent test in system transaction, because the "flush from transaction completion" feature is basically broken with stateless sessions. A stateless session accumulates changes as a pending batched command, bound to the current connection. When flushing from a system transaction, this means the command has to execute from the NHibernate enlisted resource prepare phase, potentially after (or concurrently to) its connection own prepare phase.