0

i need a way to notify an java app when new row added in table to do some jobs and run a query.

i tried to use qcn but it gives error that my db isnt support it and i dont think it is what i needed.

i dont want write a program that periodicly (i dont know if its a correct word! :D ) run the query.

the query should be run when a new row added. i googled and i searched ask tom it but no luck. the database is oracle and i want to write app in java. tnx in advance.

  • 1
    Look at https://stackoverflow.com/questions/17599155/sending-a-jms-message-from-oracle-database-on-dml-event – SMA Oct 25 '17 at 16:45
  • Consider [Continuous Query Notification](https://docs.oracle.com/database/121/JJDBC/dbchgnf.htm#JJDBC28815) – krokodilko Oct 25 '17 at 19:00
  • @krokodilko i want to use it. and i mentioned it in my question that my db probebly doesnt support it! my problem is i should develope an app that can work with different oracle db version. – alireza sadeghi Oct 26 '17 at 07:52
  • @alireza the documentation states that `This code will also work with Oracle Database 10g Release 2 (10.2)`, so 3 versions of Oracle Database are supported. If you are using Oracle 9 or earlier then consider an upgrade, version 9 is 15 years old. – krokodilko Oct 27 '17 at 16:46

1 Answers1

1

try to use "Database Change Notification"

https://docs.oracle.com/cd/E11882_01/java.112/e16548/dbchgnf.htm#JJDBC28815

Needle file
  • 508
  • 3
  • 7