wood burning stoves 2.0*
The moose likes Java in General and the fly likes Calling Java Application from Database trigger Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Calling Java Application from Database trigger" Watch "Calling Java Application from Database trigger" New topic

Calling Java Application from Database trigger

Kamal Bahadur

Joined: Jan 09, 2006
Posts: 3

I am trying to execute my java application once a reco5rd is inserted into a database table. For that sake i am planning to write a Trigger which will be called while inserting. My question is that, will i be able to call a java application from this trigger???

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39573
That depends on the database you use. Some databases support triggers written in Java (e.g., Oracle and PostgreSQL do, or have extensions that enable it). Check the manual for your database what kind of languages it supports for triggers. Maybe there is a way to call a Java program via a shell script or JNI, although I would be very hesitant to do this from a design point of view.

Ping & DNS - updated with new look and Ping home screen widget
I agree. Here's the link: http://aspose.com/file-tools
subject: Calling Java Application from Database trigger
Similar Threads
Fire a trigger from an external application on database update
Want to call Servlet and PHP from oracle
Handling SQLExceptions in java ..Urgent
caching master tables static data
view ddl for all triggers