-
Notifications
You must be signed in to change notification settings - Fork 32
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
NHibernate Saga persister does not work with Oracle #28
Conversation
The issue is that the Oracle driver does not support both TransactionScope and NH transaction, see http://stackoverflow.com/q/6870901/90882 for more info. So we now checking if there is currently an active ambient transaction and if there is we do not create a NH transaction. We also disable AutoFlush and control Flush manually.
Oracle limits the name of tables to maximum 30 characters, this makes it hard to get all acceptance tests to pass. |
Is there a way to use your solution right now? |
…ed by the user Added hook in saga convention mapper to allow user to plugin their own table naming convention
…nd TimeoutStorage to not use an ITransaction if and ambient transaction already exists.
@johannesg code review please? |
Well.
My 2 cents. 2014-03-25 8:53 GMT+01:00 John Simons notifications@github.com:
|
@johannesg thanks a lot for the code review, very much appreciated. Regarding your points:
|
Oh. My bad.
Yes, if they use transaction scope. However, maybe these can be designed to not use DTC in the first place? Just a thought...
I would say that they are not related. You should always do a flush, either using session.Flush() or using tx.Commit() (which automatically does a flush if flushmode is "Auto" or "Commit"). However, flushmode "Auto" means that NH might call Flush on multiple occasions. For example:
See here: http://weblogs.asp.net/ricardoperes/archive/2013/01/25/nhibernate-pitfalls-flush-mode.aspx So: while FlushMode.Never might give a small performance boost in some cases, it is not really related to this fix. Hope that helps. |
Yes, @andreasohlund started #21 |
This should also improve performance slightly because we use CombGuid.
@andreasohlund @johannesg I'm now managing the connections explicitly for timeouts and gateway. This should be it hopefully. |
Looks good to me. 2014-03-27 8:44 GMT+01:00 John Simons notifications@github.com:
|
Looks good , 👍 |
NHibernate Saga persister does not work with Oracle
The issue is that the Oracle driver does not support both TransactionScope and NH transaction, see http://stackoverflow.com/q/6870901/90882 for more info.
So we now checking if there is currently an active ambient transaction and if there is we do not create a NH transaction.
We also disable AutoFlush and control Flush manually.
Still to do: