# Install Database Triggers with HSQLDB

This page tries to install triggers with the demo database that comes with Apache Cocoon.

Source for the triggers can be found in the eventcache block in your Cocoon source distribution: src/blocks/eventcache/java/org/apache/cocoon/samples/eventcache/

personnel
String trigClass = ; if (trigClass.equals("http")){ trigClass = "org.apache.cocoon.samples.jms.HTTPTrigger"; } else { trigClass = "org.apache.cocoon.samples.jms.JMSTrigger"; } String what = null; for (int i = 0; i < 3; i++) { switch(i) { case 0: what="update"; break; case 1: what="insert"; break; case 2: what="delete"; break; }

Installing trigClass for what on table "user".

create trigger myTriggeri after what on user call \"trigClass\"

Failed installing myTriggeri:

Trigger already installed?

}

Uninstall triggers or go back to sample page.