Accessing Java object from Oracle trigger


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:
    (see page 11 "Cache Invalidation-calling out to Web Components"
  3. Oracle Stream[ Go to top ]

    I would try to use Oracle Streams.
  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.