I am building a non-EJB Struts application using Tomcat 5.5.9 and Oracle db.
One of the requirements is that if a table is updated, an Oracle trigger is called, which in turn needs to call a Java object (servlet or jsp). This Java object will perform some business logic and then update another table.
What is the simplest way to do this?
-
Accessing Java object from Oracle trigger (3 messages)
- Posted by: Poorav Sheth
- Posted on: October 27 2005 11:43 EDT
Threaded Messages (3)
- Accessing Java object from Oracle trigger by Joe Long on October 28 2005 03:04 EDT
- Oracle Stream by niklas k?ck on October 28 2005 08:27 EDT
- Accessing Java object from Oracle trigger by Sohail Sikora on October 28 2005 09:44 EDT
-
Accessing Java object from Oracle trigger[ Go to top ]
- Posted by: Joe Long
- Posted on: October 28 2005 03:04 EDT
- in response to Poorav Sheth
you could create a java stored procedure
(this is a java class loaded into the Oracle database)
Then you could have the trigger call that java stored proc, which in turn could call a jsp or servlet.
just google:
loadjava oracle
also, I think this whitepaper has an example:
http://www.oracle.com/technology/tech/java/java_db/pdf/OW_30820_JAVA_STORED_PROC_paper.PDF
(see page 11 "Cache Invalidation-calling out to Web Components" -
Oracle Stream[ Go to top ]
- Posted by: niklas k?ck
- Posted on: October 28 2005 08:27 EDT
- in response to Joe Long
I would try to use Oracle Streams.
http://www.oracle.com/technology/products/dataint/htdocs/streams_fo.html -
Accessing Java object from Oracle trigger[ Go to top ]
- Posted by: Sohail Sikora
- Posted on: October 28 2005 09:44 EDT
- in response to Poorav Sheth
You could also use Oracle to write a message to a queue and have a JMS provider in Tomcat. This will let you reuse the JMS provider if you ever need to add queuing.