Wednesday, May 13, 2009

ODP.Net 10 - Data Change Notification

AAARRRGGGHHH!!!!

It was a perfect storm.

Version 10.... of Oracle's ODP.Net seems to misbehave... IF

You use data change notification
-- and --
hook up a delegate
-- and --
You have a CLOB in the table being watched

The latest (beta) release of 11.... works fine. Guess what? Too many other things are using 10 and would need to be retested. No time now.

What to do? Today I'll be trying a few things. (In order of nastiness)
  1. Create a timer to check for changes. I'll still hook up the DCN to the database, but instead of responding to the change immediately, I'll use the timer to check for changes (ON MY TERMS)
  2. If that doesn't work, I'll split the CLOB off to another table
  3. If THAT doesn't work, I'll have to poll the database and compare the results to what I already have in memory.
I'll let you know how it works out in the end...

-- Edit 5/30/2009 --
The problem turned out to be the connection. My connection to the database kept closing. Since I was trying to optimize my system, I opened the connection at the beginning and expected it to remain open. (It didn't) Any way; when you try to use a database connection that is no longer valid, you do not always get an error message or an exception. You get !@#$% ( I mean "a hung process")

No comments:

Post a Comment