permaculture playing cards*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 41076
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 - my free Android networking tools app
subject: Calling Java Application from Database trigger
Similar Threads
caching master tables static data
Fire a trigger from an external application on database update
view ddl for all triggers
Handling SQLExceptions in java ..Urgent
Want to call Servlet and PHP from oracle