Before I begin, I'm in an environment that uses NHibernate with C#. We don't use the JavaScript implementation; just C# on the backend. We have a combination of ASP.NET 3.5 and .NET 3.5 in a Windows Service that spins off separate process threads.
Has anyone ever experienced an issue with NHibernate where an exception can cause other processes to break?
For example:
We have a Windows Service outside of our normal web application, which does a lot of data management and automated processes. Let's consider the following scenario:
=> Service A is populating a table with the word "Hello" into a column with the data type VARCHAR(5)
=> Service B is updating values on a separate table from the word "August" to "September" with the data type VARCHAR(50)
Service A is in a transaction that has all inserts happening in the same transaction.
Service B is in a transaction that has all updates happening in the same transaction.
Service A and Service B obviously don't share the same transaction.
These services are running in separate threads and execute at the same time.
If Service A tries to enter "Hello Again" and violates the data constraints, Service B will exit without finishing the process. There is usually a rollback will occur on Service A and Service B, due to this, so no changes are committed.
I apologize if this explanation is too cryptic, but the data and the process are irrelevant; it's the exception and results that are what are important. Almost all of our processes do it and the exeption that occurs could be just about anything, including data type mismatches, timeouts or database deadlocks.
This is all theory, so I don't have specific code that can be guaranteed to replicate this.
I guess what I'm getting at is if NHibernate will roll back other transactions because a separate thread had an exception within it?
Please also understand that the Windows Service is the easiest way for us to replicate this, but we have also seen this happen during the ASP.NET processes.
Thank you in advance for any and all help!