2

I would like to run a Java program(plug-in), for a trigger on a table, say AFTER INSERT. How do I create the database trigger, to achieve this and get the java program executed on insert of a row in the table.

I see in some documents, that a Java program can be called, on database events as above (ON INSERT/UPDATE). But I could find the procedure for achieving this technique.

References of Java invocation are from the following links:

  1. The first test version of FB/Java, compatible with Firebird 3.0.0 https://www.firebirdsql.org/en/news/the-first-test-version-of-fb-java-compatible-with-firebird-3/ FB/Java is an External Engine plugin for Firebird that makes Firebird capable of run functions, procedures, and triggers made in the Java platform.

  2. New In Firebird 3.0 https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-new.html Eventually, plug-in support for stored procedures, triggers and functions written in Java, C++, ObjectPascal, etc.

  3. UDRs in java https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-apiods-api.html#d0e5446 Firebird 3 supports external engines, bridges between the engine and the execution environments that can run UDRs: native code, Java and others

Appreciate any help in terms of documentation links and sample examples. I am using Firebird-3.0.2 on windows 7 64-bit.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Raghu
  • 33
  • 1
  • 7
  • Asking for off-site resource like documentation and examples is off-topic. But as a starting point: https://github.com/FirebirdSQL/fbjava . I suggest you post a question on the Firebird-Java mailinglist if you need more information or help. Java stored procedures are relatively new, and I haven't yet heard of people actively using it. – Mark Rotteveel Dec 23 '17 at 18:43
  • Thank you very much Mark. This is what I was looking for. – Raghu Dec 25 '17 at 13:51

0 Answers0