Tips and Tricks in a world of Mix

The problem is :
I have a working system with FluentNhibernate.
I have a legacy database and it’s hybrid system which suppose to give an answer to a new and old systems as one. So that means I couldn’t use the Version – which means at this point to change the schema and add column to each table.

I’ve added OptimistickLock.Dirty() with Transaction.IsolationLevel.ReadCommited() to deal with the problem of locking .
The trouble is that when the row locked in Oracle 10g and I am trying to SaveOrUpdate the entity it just stops the application.

Then , when I save or rollback in Oracle the Application gets the process back and throws the exception NHibernate.StaleObjectStateException that is being handled in my exception handler which is fine.

The question is how to make the application to recognize on the spot that there is a lock on the current row I am trying to access and throw the adequate exception .

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: