aspose file tools*
The moose likes JDBC and the fly likes How to capture the event in Java when trigger is fired in Oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to capture the event in Java when trigger is fired in Oracle" Watch "How to capture the event in Java when trigger is fired in Oracle" New topic
Author

How to capture the event in Java when trigger is fired in Oracle

G Mani
Greenhorn

Joined: Mar 21, 2006
Posts: 1
Hi,
Is there any possibility to capture an oracle trigger event in Java application that is using that d/b.either by using Observable class or by other means.
Respond with the possibility needed urgently.

Thanks in Advance
--Mani
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Well, good question. Not sure I know the anzwer, but considering that you can have Java classes being used in a PL/SQL Stored Proceudre, I assume you could simulate this event capture where your Java Object sends out a JMS Asynchronous message, which "triggers" the event in Java, where your Java Objects are subscribers to that Queue, and therefore will know when that Oracle Stored Procedure is run.

But that might be the long way around, if something does already exist.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Bill Johnston
Ranch Hand

Joined: Nov 17, 2005
Posts: 201
I wonder if Menon might have something on that in his new book?


~Bill
R. M. Menon
Author
Ranch Hand

Joined: Mar 15, 2006
Posts: 50
Originally posted by Bill Johnston:
I wonder if Menon might have something on that in his new book?


I am afraid not This is kind of specific requirement. The only way I can think of is to use JMS like Mark suggested. The trigger would result in a JMS message to the application. (I am no JMS expert, btw)

May I ask what the real business requirement is in this case?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to capture the event in Java when trigger is fired in Oracle