Alignment: Chaotic Java

Monday, November 21, 2005

Oracle, Java and data modification notifications

I've been handed a task to see if it's possible to create a single Java method which would parse old and new values in a before update/insert/delete trigger. The idea is to send the parsed data to a middle tier layer which would then propogate the data to all the business objects. We Could do that using PL/SQL, only that we'd have to create a method for every table, which is unacceptable. If, using Java, we could iterate the row's new and old columns' and retrieve the data to be parsed as XML and sent to the client, we would be happy campers.

And that's the task. The problem I've encountered so far is that no-one seems to be passing the :old or :new objects to the Java method - Only a specific value such as :old.parent_id. Is passing the :old object even possible? Is there an alternative to our solution?

I guess I leave it as an open question. I hope that soon enough I will have an answer and I could post it, as it seems interesting enough - A notification system in Oracle based on a single Java-written trigger. I'm not an Oracle DBA - I just got this task because I'm the only one with Java knowledge to be able to write a method like that (even though it seems simple enough), but it seems there isn't a really Well Defined notification mechanism for Oracle.. Am I wrong?

3 Comments:

At 11/23/2005 03:25:00 PM, Anonymous Anonymous said...

There was an article published on Java Pro titled "Streamline Data Delivery in Java" by Mark Nadelson that might be of interest to you. However, I can't seem to locate the article on the Java Pro web site. If you send me your e-mail, I'll send you the article.

Gary Blomquist
garyblomquist@yahoo.com

 
At 12/08/2005 08:39:00 PM, Anonymous Anonymous said...

Did you try the technique from the article? How did it work?

Gary Blomquist

 
At 12/08/2005 09:23:00 PM, Blogger Avah said...

I've posted a response about it. Sorry I haven't done so earlier.

Here

 

Post a Comment

Links to this post:

Create a Link

<< Home