I am building a non-EJB Struts application using Tomcat 5.5.9 and Oracle db.
- Posted by: Poorav Sheth
- Posted on: October 27 2005 11:43 EDT
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?
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.
also, I think this whitepaper has an example:
(see page 11 "Cache Invalidation-calling out to Web Components"
I would try to use Oracle Streams.
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.