Accessing Java object from Oracle trigger

Discussions

Web tier: servlets, JSP, Web frameworks: Accessing Java object from Oracle trigger

  1. Accessing Java object from Oracle trigger (3 messages)

    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?

    Threaded Messages (3)

  2. 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"
  3. Oracle Stream[ Go to top ]

    I would try to use Oracle Streams.

    http://www.oracle.com/technology/products/dataint/htdocs/streams_fo.html
  4. 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.